tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 19800] New: - Class loader cannot locate javax.servlet.HttpServlet for SOAP webapp
Date Fri, 09 May 2003 15:26:42 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19800>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19800

Class loader cannot locate javax.servlet.HttpServlet for SOAP webapp

           Summary: Class loader cannot locate javax.servlet.HttpServlet for
                    SOAP webapp
           Product: Tomcat 4
           Version: 4.1.18
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: petter.mahlen@chello.se


I am running Tomcat 4.1.18 on a Cygwin/Windows 2000 machine with JSDK 1.4.1_01. 
When I use a servlet webapp of my own, it works without problems. However, when 
I tried running Apache soap_2_3_1, I get the following error:

===========================================================
2003-05-09 17:01:20 StandardWrapperValve[rpcrouter]: Allocate exception for 
servlet rpcrouter
javax.servlet.ServletException: Error allocating a servlet instance
	at org.apache.catalina.core.StandardWrapper.allocate
(StandardWrapper.java:670)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:214)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(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.invokeNex
t(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:2415)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:172)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(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.invokeNex
t(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:432)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:386)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:534)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:530)
	at java.lang.Thread.run(Thread.java:536)
----- Root Cause -----
java.lang.NoClassDefFoundError: javax/servlet/http/HttpServlet
	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 java.lang.ClassLoader.loadClass(ClassLoader.java:299)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:292)
	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:265)
	at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
	at org.apache.catalina.loader.WebappClassLoader.loadClass
(WebappClassLoader.java:1340)
	at org.apache.catalina.loader.WebappClassLoader.loadClass
(WebappClassLoader.java:1274)
	at org.apache.catalina.core.StandardWrapper.loadServlet
(StandardWrapper.java:884)
	at org.apache.catalina.core.StandardWrapper.allocate
(StandardWrapper.java:666)
	at org.apache.catalina.core.StandardWrapperValve.invoke
(StandardWrapperValve.java:214)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(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.invokeNex
t(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:2415)
	at org.apache.catalina.core.StandardHostValve.invoke
(StandardHostValve.java:180)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:643)
	at org.apache.catalina.valves.ErrorDispatcherValve.invoke
(ErrorDispatcherValve.java:170)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(StandardPipeline.java:641)
	at org.apache.catalina.valves.ErrorReportValve.invoke
(ErrorReportValve.java:172)
	at 
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNex
t(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.invokeNex
t(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:432)
	at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnectio
n(Http11Protocol.java:386)
	at org.apache.tomcat.util.net.TcpWorkerThread.runIt
(PoolTcpEndpoint.java:534)
	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run
(ThreadPool.java:530)
	at java.lang.Thread.run(Thread.java:536)
===========================================================



I was unable to locate the source code for 4.1.18 on the Tomcat web site, but 
looking at the source for for 4.1.24, and guessing a change of the line numbers 
based on the stack trace, I noted that it seems to be the call to 
system.loadClass() on line 1355 of org.apache.catalina.load.WebappClassLoader 
that fails (case 0.2). So I tried copying servlet.jar from the Tomcat 
installation to $JAVA_HOME/jre/lib/ext, and that solved the problem. It seems 
quite inelegant to me, since obviously Tomcat has access to servlet.jar without 
it being located there.

I am not quite able to follow how the class loader is chosen in 
StandardWrapper/WebappClassLoader, but there seems to be some kind of bug there 
or in the SOAP code. I also tried placing servlet.jar in the webapp's lib 
directory, but that did not work. I don't understand why this happens only with 
SOAP, and not with my own application, but then I have not tried to understand 
the SOAP code.

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message