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 3817] New: - classpath loading priority doesn't match docs
Date Tue, 25 Sep 2001 17:45:10 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=3817>.
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=3817

classpath loading priority doesn't match docs

           Summary: classpath loading priority doesn't match docs
           Product: Tomcat 4
           Version: 4.0 Final
          Platform: PC
        OS/Version: Windows 9x
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Catalina
        AssignedTo: tomcat-dev@jakarta.apache.org
        ReportedBy: pogo_tomcat@yahoo.com


Placing a jar file that contains the Servlet 2.2 classes in $CATALINA_HOME/lib
causes Tomcat to fail to display JSP pages.  The documented class loading order
in http://jakarta.apache.org/tomcat/tomcat-4.0-doc/class-loader-howto.html is:

    * /WEB-INF/classes of your web application
    * /WEB-INF/lib/*.jar of your web application
    * Bootstrap classes of your JVM
    * System class loader classses (described above)
    * $CATALINA_HOME/common/classes
    * $CATALINA_HOME/common/*.jar
    * $CATALINA_HOME/classes
    * $CATALINA_HOME/lib/*.jar

Since $CATALINA_HOME/lib is last in priority, shouldn't the Servlet 2.3 classes
override the old Servlet classes in $CATALINA_HOME/lib?

This may seem like a perverse thing to do, but it has to do with making a jar
file that's easy to install and use in multiple environments.


The error that Tomcat gives is:
2001-09-25 10:37:38 StandardWrapper[/tomcat-docs:invoker]: Loading container
servlet invoker
2001-09-25 10:37:38 invoker: init
2001-09-25 10:37:38 StandardWrapper[/tomcat-docs:jsp]: Using Jasper classloader
for servlet jsp
2001-09-25 10:37:38 StandardWrapper[/tomcat-docs:jsp]: Marking servlet jsp as
unavailable
2001-09-25 10:37:38 StandardContext[/tomcat-docs]: Servlet /tomcat-docs threw
load() exception
javax.servlet.ServletException: Class org.apache.jasper.servlet.JspServlet is
not a Servlet
	at org.apache.catalina.core.StandardWrapper.load(Unknown Source)
	at org.apache.catalina.core.StandardContext.loadOnStartup(Unknown Source)
	at org.apache.catalina.core.StandardContext.start(Unknown Source)
	at org.apache.catalina.core.ContainerBase.addChild(Unknown Source)
	at org.apache.catalina.core.StandardHost.addChild(Unknown Source)
	at org.apache.catalina.core.StandardHost.install(Unknown Source)
	at org.apache.catalina.startup.HostConfig.deployApps(Unknown Source)
	at org.apache.catalina.startup.HostConfig.start(Unknown Source)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(Unknown Source)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Unknown Source)
	at org.apache.catalina.core.ContainerBase.start(Unknown Source)
	at org.apache.catalina.core.ContainerBase.start(Unknown Source)
	at org.apache.catalina.core.StandardEngine.start(Unknown Source)
	at org.apache.catalina.core.StandardService.start(Unknown Source)
	at org.apache.catalina.core.StandardServer.start(Unknown Source)
	at org.apache.catalina.startup.Catalina.start(Unknown Source)
	at org.apache.catalina.startup.Catalina.execute(Unknown Source)
	at org.apache.catalina.startup.Catalina.process(Unknown Source)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.catalina.startup.Bootstrap.main(Unknown Source)
----- Root Cause -----
java.lang.ClassCastException: org.apache.jasper.servlet.JspServlet
	at org.apache.catalina.core.StandardWrapper.load(Unknown Source)
	at org.apache.catalina.core.StandardContext.loadOnStartup(Unknown Source)
	at org.apache.catalina.core.StandardContext.start(Unknown Source)
	at org.apache.catalina.core.ContainerBase.addChild(Unknown Source)
	at org.apache.catalina.core.StandardHost.addChild(Unknown Source)
	at org.apache.catalina.core.StandardHost.install(Unknown Source)
	at org.apache.catalina.startup.HostConfig.deployApps(Unknown Source)
	at org.apache.catalina.startup.HostConfig.start(Unknown Source)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(Unknown Source)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Unknown Source)
	at org.apache.catalina.core.ContainerBase.start(Unknown Source)
	at org.apache.catalina.core.ContainerBase.start(Unknown Source)
	at org.apache.catalina.core.StandardEngine.start(Unknown Source)
	at org.apache.catalina.core.StandardService.start(Unknown Source)
	at org.apache.catalina.core.StandardServer.start(Unknown Source)
	at org.apache.catalina.startup.Catalina.start(Unknown Source)
	at org.apache.catalina.startup.Catalina.execute(Unknown Source)
	at org.apache.catalina.startup.Catalina.process(Unknown Source)
	at java.lang.reflect.Method.invoke(Native Method)
	at org.apache.catalina.startup.Bootstrap.main(Unknown Source)

Mime
View raw message