axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matthias Brunner ...@blumenstrasse.vol.at>
Subject Class loader madness and useless error reporting
Date Thu, 14 Nov 2002 13:43:57 GMT
Hello,

I do not know whether this is a bug in tomcat or axis or both (in 
fact, I do not even know if it is it a bug at all or it is me how is 
dumb).
But for now I will only report it here please correct me if I am 
wrong.

------
Software used:
tomcat 4.1.12, axis 1.0, sun jdk 1.4.1_01-b01, linux

I have an RPC-style service, the required JAR myservice.jar is 
located in axis/WEB-INF/lib. This has been working without any 
problems for months.
I needed some of the classes in another context so I moved the JAR 
from axis/WEB-INF/lib to shared/lib (as the tomcat documentation 
tells me to).
Now when I access axis/servlet/AxisServlet an empty page is returned 
(and calling the service results in the same error as listed below).
localhost_log contains the following message:

++++++++++++++++++++++++++++++
2002-11-14 14:15:30 StandardWrapperValve[AxisServlet]: 
Servlet.service() for servlet AxisServlet threw exception
javax.servlet.ServletException: Servlet execution threw an exception
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
	at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
	at java.lang.Thread.run(Thread.java:536)
----- Root Cause -----
java.lang.NoClassDefFoundError: javax/xml/rpc/server/ServiceLifecycle
	at java.lang.ClassLoader.defineClass0(Native Method)
	at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
	at 
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
	at java.net.URLClassLoader.defineClass(URLClassLoader.java:250)
	at java.net.URLClassLoader.access$100(URLClassLoader.java:54)
	at java.net.URLClassLoader$1.run(URLClassLoader.java:193)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(URLClassLoader.java:186)
	at 
org.apache.catalina.loader.StandardClassLoader.findClass(StandardClassLoader.java:621)
	at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:958)
	at 
org.apache.catalina.loader.StandardClassLoader.loadClass(StandardClassLoader.java:857)
	at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1414)
	at 
org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1274)
	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:217)
	at org.apache.axis.utils.ClassUtils$2.run(ClassUtils.java:187)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.axis.utils.ClassUtils.loadClass(ClassUtils.java:171)
	at org.apache.axis.utils.ClassUtils.forName(ClassUtils.java:154)
	at 
org.apache.axis.utils.cache.ClassCache.lookup(ClassCache.java:122)
	at 
org.apache.axis.providers.java.JavaProvider.getServiceClass(JavaProvider.java:502)
	at 
org.apache.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:535)
	at 
org.apache.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:322)
	at 
org.apache.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:477)
	at 
org.apache.axis.deployment.wsdd.WSDDDeployment.getDeployedServices(WSDDDeployment.java:566)
	at 
org.apache.axis.configuration.FileProvider.getDeployedServices(FileProvider.java:322)
	at 
org.apache.axis.transport.http.AxisServlet.reportAvailableServices(AxisServlet.java:584)
	at 
org.apache.axis.transport.http.AxisServlet.doGet(AxisServlet.java:256)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at 
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:335)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:260)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2396)
	at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
	at 
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
	at 
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
	at 
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
	at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:380)
	at 
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
	at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:533)
	at java.lang.Thread.run(Thread.java:536)
++++++++++++++++++++++++++++++


Of course, jaxrpc.jar has been present all the time. When I move my 
myservice.jar back to axis/WEB-INF/lib the error is gone and the 
services are listed correctly.

So two questions are raised:

1) Why can't I access classes placed into shared/lib from the axis 
context. Is this a tomcat problem (I have found nothing appropriate 
in the archives)?

2) If the service classes are not found why isn't this reported 
correctly?
This is *VERY* maddening, actually. It to me two work days just to 
figure out that I had to move my jar back to WEB-INF/lib, as the 
error message does not mention my service class files. (I spent 
hours after hours shifting around jaxrpc.jar, downloading older 
JDKs, etc.)

Can anyone reproduce this (any JAR file with a service class should 
be sufficient, if not I will provide a test case)?

Thanks in advance for your advice.
Best regards!
-- 
Matthias Brunner <mb@blumenstrasse.vol.at>
PGP FP 7862 32B3 3B75 292A F76F  5042 8587 21AB 5B89 D501
Check out http://blumenstrasse.vol.at/~mb/gpgkey.asc


Mime
View raw message