tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tomcat-u...@erit.se
Subject What is the difference in classloading between tomcat 4.1.x and 5.0.x
Date Wed, 01 Sep 2004 19:58:29 GMT

In a web application running under Tomcat, I have defined a filter in the web.xml file. The
filter is pointing to a class that is packed in a jar-file, and the jar-file is kept in the
$CATALINA_HOME/shared/lib directory. 

In Tomcat 4.1.x the application is working without any problems. When trying to run the same
application under Tomcat 5.0.28 a java.lang.ClassNotFoundException is thrown.

If the jar-file is placed in $CATALINA_HOME/common/lib, then the class is found  and the application
runs without problem.

The same issue appears when using Listeners in the web.xml file.

I have also tried the same setup with 5.0.27 which leads to the same result.

What is it that has changed between 4.1x and 5.0.x, in regards to classloading, in order to
cause this problem ?

Any help in understanding this problem is appreciated.
Regards 
Erik


 **********  stacktrace  ******************************************************
2004-09-01 17:35:07 NamingContextListener[/Catalina/localhost/webdialInstance]:   Resource
parameters for UserTransaction = null
2004-09-01 17:35:07 StandardContext[/webdialInstance]Exception starting filter Compress
java.lang.ClassNotFoundException: se.erit.web.servlet.filters.gzip.GZIPFilter
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1340)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1189)
	at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:211)
	at org.apache.catalina.core.ApplicationFilterConfig.setFilterDef(ApplicationFilterConfig.java:308)
	at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:79)
	at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:3698)
	at org.apache.catalina.core.StandardContext.start(StandardContext.java:4349)
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:823)
	at org.apache.catalina.core.ContainerBase.access$000(ContainerBase.java:121)
	at org.apache.catalina.core.ContainerBase$PrivilegedAddChild.run(ContainerBase.java:143)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:805)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:595)
	at org.apache.catalina.core.StandardHostDeployer.addChild(StandardHostDeployer.java:903)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216)
	at org.apache.commons.digester.SetNextRule.end(SetNextRule.java:256)
	at org.apache.commons.digester.Rule.end(Rule.java:276)
	at org.apache.commons.digester.Digester.endElement(Digester.java:1058)
	at org.apache.catalina.util.CatalinaDigester.endElement(CatalinaDigester.java:76)
	at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown
Source)
	at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.commons.digester.Digester.parse(Digester.java:1567)
	at org.apache.catalina.core.StandardHostDeployer.install(StandardHostDeployer.java:488)
	at org.apache.catalina.core.StandardHost.install(StandardHost.java:863)
	at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:483)
	at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:427)
	at org.apache.catalina.startup.HostConfig.start(HostConfig.java:983)
	at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:349)
	at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1091)
	at org.apache.catalina.core.StandardHost.start(StandardHost.java:789)
	at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1083)
	at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:478)
	at org.apache.catalina.core.StandardService.start(StandardService.java:480)
	at org.apache.catalina.core.StandardServer.start(StandardServer.java:2313)
	at org.apache.catalina.startup.Catalina.start(Catalina.java:556)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:287)
	at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:425)

*************** end of trace ***************************************************




Erik Rosengren
ERIT Consulting AB
+46-70-7183333
mailto:erik.rosengren@erit.se
http://www.erit.se




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


Mime
View raw message