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 38223] - ConfigurableClasspathWebappLoader
Date Tue, 17 Jan 2006 10:36:57 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=38223>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=38223





------- Additional Comments From oded@m-wise.com  2006-01-17 11:36 -------
Hi. I've tried to get your latest code to work with my Tomcat 5.0.30. I of
course recompiled the source, as I'm using JDK 1.4.2. 
I also had to change the digester from tomcat.util.digester to commons-digester
as the former package is not available on my installation (tomcat 5.5 only ?).

Now when I load my web application, everytime I try to access something which is
handled by the default servlet (such as images or static html), I get a 404
error - "servlet default is not available".

Apparently, with the configurable web app class loader loaded, tomcat can't find
DefaultServlet from servlets-default.jar. I'm not sure why is that, but with my
implementation it does the same.

I enabled full debug logging for tomcat, and Here are the class loader hierarchy
for a normal web application:

 DEBUG [main] org.apache.commons.modeler.BaseModelMBean - preRegister
WebappClassLoader
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
StandardClassLoader
  delegate: true
  repositories:
    file:/var/lib/tomcat5/server/classes/
    file:/var/lib/tomcat5/server/lib/catalina-i18n-es.jar
    file:/usr/share/java/regexp-1.3.jar
    file:/var/lib/tomcat5/server/lib/tomcat-jk2.jar
    file:/var/lib/tomcat5/server/lib/tomcat-coyote.jar
    file:/var/lib/tomcat5/server/lib/servlets-webdav.jar
    file:/usr/share/java/jakarta-commons-fileupload-1.0.jar
    file:/usr/share/java/mx4j/mx4j-jmx-3.0.1.jar
    file:/var/lib/tomcat5/server/lib/tomcat-util.jar
    file:/var/lib/tomcat5/server/lib/catalina.jar
    file:/var/lib/tomcat5/server/lib/catalina-i18n-fr.jar
    file:/var/lib/tomcat5/server/lib/tomcat-http11.jar
    file:/usr/java/j2sdk1.4.2_09/jre/lib/rt.jar
    file:/usr/share/java/catalina-ant-5.0.30.jar
    file:/usr/share/java/jakarta-commons-digester-1.7.jar
    file:/var/lib/tomcat5/server/lib/servlets-default.jar
    file:/usr/share/java/jakarta-commons-modeler-1.1.jar
    file:/var/lib/tomcat5/server/lib/servlets-invoker.jar
    file:/usr/share/java/jakarta-commons-logging-1.0.4.jar
    file:/var/lib/tomcat5/server/lib/catalina-cluster.jar
    file:/var/lib/tomcat5/server/lib/catalina-i18n-ja.jar
    file:/usr/share/java/jakarta-commons-beanutils-1.7.0.jar
    file:/usr/share/java/jakarta-commons-el-1.0.jar
    file:/var/lib/tomcat5/server/lib/catalina-optional.jar
    file:/var/lib/tomcat5/server/lib/tomcat-jk.jar
    file:/var/lib/tomcat5/server/lib/servlets-common.jar
    file:/var/lib/tomcat5/server/lib/tomcat-jni.jar
----------> Parent Classloader:
StandardClassLoader
  delegate: true
  repositories:
    file:/var/lib/tomcat5/common/classes/
    file:/usr/share/java/xml-commons-apis-1.3.02.jar
    file:/usr/share/java/xerces-j2-2.7.1.jar
    file:/usr/share/java/jta-1.0.1.jar
    file:/usr/java/j2sdk1.4.2_09/jre/lib/rt.jar
    file:/usr/share/java/mx4j/mx4j-jmx-3.0.1.jar
    file:/usr/share/java/jakarta-commons-pool-1.2.jar
    file:/usr/java/j2sdk1.4.2_09/jre/lib/rt.jar
    file:/usr/share/java/jasper5-compiler-5.0.30.jar
    file:/usr/share/java/ant-1.6.2.jar
    file:/usr/share/java/servletapi5-5.0.30.jar
    file:/var/lib/tomcat5/common/lib/naming-java.jar
    file:/var/lib/tomcat5/common/lib/naming-resources.jar
    file:/usr/share/java/jaf-1.0.2.jar
    file:/usr/share/java/ant-launcher-1.6.2.jar
    file:/usr/share/java/jspapi-5.0.30.jar
    file:/usr/share/java/javamail-1.3.3_01.jar
    file:/usr/share/java/jakarta-commons-el-1.0.jar
    file:/usr/share/java/jakarta-commons-collections-3.1.jar
    file:/usr/share/java/jakarta-commons-logging-api-1.0.4.jar
    file:/var/lib/tomcat5/common/lib/naming-factory.jar
    file:/var/lib/tomcat5/common/lib/naming-common.jar
    file:/usr/share/java/jasper5-runtime-5.0.30.jar
    file:/usr/share/java/jakarta-commons-dbcp-1.2.1.jar
----------> Parent Classloader:
sun.misc.Launcher$AppClassLoader@7b7072

And here is the same output for a web application loaded with your configurable
class loader implementation (the output looks identical to the one with my
implementation, I think)

DEBUG [main] org.apache.commons.modeler.BaseModelMBean - preRegister
WebappClassLoader
  delegate: false
  repositories:
    /WEB-INF/classes/
----------> Parent Classloader:
StandardClassLoader
  delegate: true
  repositories:
    file:/var/lib/tomcat5/shared/classes/
----------> Parent Classloader:
StandardClassLoader
  delegate: true
  repositories:
    file:/var/lib/tomcat5/common/classes/
    file:/usr/share/java/xml-commons-apis-1.3.02.jar
    file:/usr/share/java/xerces-j2-2.7.1.jar
    file:/usr/share/java/jta-1.0.1.jar
    file:/usr/java/j2sdk1.4.2_09/jre/lib/rt.jar
    file:/usr/share/java/mx4j/mx4j-jmx-3.0.1.jar
    file:/usr/share/java/jakarta-commons-pool-1.2.jar
    file:/usr/java/j2sdk1.4.2_09/jre/lib/rt.jar
    file:/usr/share/java/jasper5-compiler-5.0.30.jar
    file:/usr/share/java/ant-1.6.2.jar
    file:/usr/share/java/servletapi5-5.0.30.jar
    file:/var/lib/tomcat5/common/lib/naming-java.jar
    file:/var/lib/tomcat5/common/lib/naming-resources.jar
    file:/usr/share/java/jaf-1.0.2.jar
    file:/usr/share/java/ant-launcher-1.6.2.jar
    file:/usr/share/java/jspapi-5.0.30.jar
    file:/usr/share/java/javamail-1.3.3_01.jar
    file:/usr/share/java/jakarta-commons-el-1.0.jar
    file:/usr/share/java/jakarta-commons-collections-3.1.jar
    file:/usr/share/java/jakarta-commons-logging-api-1.0.4.jar
    file:/var/lib/tomcat5/common/lib/naming-factory.jar
    file:/var/lib/tomcat5/common/lib/naming-common.jar
    file:/usr/share/java/jasper5-runtime-5.0.30.jar
    file:/usr/share/java/jakarta-commons-dbcp-1.2.1.jar
----------> Parent Classloader:
sun.misc.Launcher$AppClassLoader@7b7072

As you can see, for some reason one level of StandardClassLoader, which contains
the servlets-default.jar is missing for some reason. 

Can you guess what's going on ?

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

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


Mime
View raw message