axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Leone" <markleone...@hotmail.com>
Subject RE: NoClassDefFoundError writing simple handler
Date Sat, 01 May 2004 18:51:21 GMT
Have you looked in axis.jar and verified explicitly that BasicHandler.class 
is present?



>From: Robert Mecklenburg <mecklen@realmsys.com>
>Reply-To: axis-user@ws.apache.org
>To: Axis Users <axis-users@ws.apache.org>
>Subject: NoClassDefFoundError writing simple handler
>Date: 30 Apr 2004 09:19:47 -0600
>
>I'm a newbie to web services and axis and I'm trying to implement a
>simple handler.
>
>1. The handler code is:
>
>   public class LogHandler extends BasicHandler
>   {
>     public final void invoke(MessageContext msgContext) throws AxisFault
>     {
>       System.out.println("handler invoked!");
>     }
>   }
>
>2. I modified my server-config.wsdd with:
>
>   <handler name="loghandler" 
>type="java:com.realmsys.mdms.server.key.LogHandler">
>     <parameter name="wsdlURL" value="/axis/LogHandlerService-impl.wsdl"/>
>     <parameter name="serviceName" value="LogHandlerService"/>
>     <parameter name="namespace" 
>value="http://com.realmsys.mdms/LogHandlerService-impl.wsdl"/>
>     <parameter name="portName" value="Debug"/>
>   </handler>
>
>3. I added my new handler to my service:
>
>   <service name="KeyManagerService" provider="java:RPC">
>
>     <requestFlow>
>       <handler type="loghandler"/>
>     </requestFlow>
>
>     <responseFlow>
>       <handler type="loghandler"/>
>     </responseFlow>
>
>     <parameter name="allowedMethods" value="*"/>
>     ...
>
>4. When I deploy and run this configuration I get this message returned
>    to the client app:
>
>   AxisFault
>    faultCode: {http://xml.apache.org/axis/}HTTP
>    faultSubcode:
>    faultString: (500)Internal Server Error
>    faultActor:
>    faultNode:
>    faultDetail:
>	  {}string: return code:  500
>
>   Apache Tomcat/5.0.19 - Error report
>   HTTP Status 500 -
>   type
>   Exception report
>   message
>   description
>   The server encountered an internal error () that prevented it from 
>fulfilling this request.
>   exception
>   javax.servlet.ServletException: Servlet execution threw an exception
>   root cause java.lang.NoClassDefFoundError: 
>org/apache/axis/handlers/BasicHandler
>	  java.lang.ClassLoader.defineClass0(Native Method)
>	  java.lang.ClassLoader.defineClass(ClassLoader.java:537)
>	  java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
>	  java.net.URLClassLoader.defineClass(URLClassLoader.java:251)
>	  java.net.URLClassLoader.access$100(URLClassLoader.java:55)
>	  java.net.URLClassLoader$1.run(URLClassLoader.java:194)
>	  java.security.AccessController.doPrivileged(Native Method)
>	  java.net.URLClassLoader.findClass(URLClassLoader.java:187)
>	  java.lang.ClassLoader.loadClass(ClassLoader.java:289)
>	  sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:274)
>	  java.lang.ClassLoader.loadClass(ClassLoader.java:235)
>	  
>org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1296)
>	  
>org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1230)
>	  java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
>           ...
>
>Without the <requestFlow>/<responseFlow> clauses my pivot service
>appears to work fine.  It goes sour only with the new handler.  It
>appears there is some kind of security issue since *clearly* the
>axis.jar files are loaded and running (it is deep in axis code when
>it throws the exception).
>
>Any suggestions would be greatly appreciated!
>
>Cheers,
>Robert
>
>
>P.S.  I've tried many permutations, of course, one which may be of
>particular interest is that I replaced my service declaration in the
>wsdd file with the simpler:
>
>   <handler name="loghandler" 
>type="java:com.realmsys.mdms.server.key.LogHandler"/>
>
>as I saw several such short declarations in the default wsdd file.
>The change did not cure the problem.

_________________________________________________________________
FREE pop-up blocking with the new MSN Toolbar  get it now! 
http://toolbar.msn.com/go/onm00200415ave/direct/01/


Mime
View raw message