cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeff Turner <je...@apache.org>
Subject Re: Experiences with C2.1M1 on tomcat3.2.4?
Date Thu, 01 May 2003 03:40:13 GMT
On Wed, Apr 30, 2003 at 02:18:14PM +0200, Michael Gerzabek wrote:
> Hi,
> 
> when starting Cocoon 2.1M1 on Tomcat 3.2.4 I get this stacktrace. Has anyone
> an idea where to look to?

Same problem here with 3.2.3.  It seems that Tomcat 3.2.x doesn't set the
thread context classloader, so when ClassUtils does this:

  return Thread.currentThread().getContextClassLoader();

It gets the JDK classloader, not the Tomcat one.

The solution is to edit WEB-INF/web.xml and set the 'init-classloader'
parameter to true.  This explicitly sets the thread's context classloader
to that of the servlet.

--Jeff

> Thanks,
> Michael
> 
> ERROR   (2003-04-30) 14:14.11:540   [access] (Unknown-URI)
> Unknown-thread/CocoonServlet: Exception reloading
> java.lang.ClassNotFoundException: org.apache.cocoon.Cocoon
> 	at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
> 	at java.security.AccessController.doPrivileged(Native Method)
> 	at java.net.URLClassLoader.findClass(URLClassLoader.java:183)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:294)
> 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:281)
> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:250)
> 	at org.apache.cocoon.util.ClassUtils.loadClass(ClassUtils.java:88)
> 	at org.apache.cocoon.util.ClassUtils.newInstance(ClassUtils.java:75)
> 	at
> org.apache.cocoon.servlet.CocoonServlet.createCocoon(CocoonServlet.java:1368)
> 	at org.apache.cocoon.servlet.CocoonServlet.init(CocoonServlet.java:554)
> 	at org.apache.tomcat.core.ServletWrapper.doInit(ServletWrapper.java:317)
> 	at org.apache.tomcat.core.Handler.init(Handler.java:215)
> 	at org.apache.tomcat.core.ServletWrapper.init(ServletWrapper.java:296)
> 	at
> org.apache.tomcat.context.LoadOnStartupInterceptor.contextInit(LoadOnStartupInterceptor.java:130)
> 	at
> org.apache.tomcat.core.ContextManager.initContext(ContextManager.java:491)
> 	at org.apache.tomcat.core.ContextManager.init(ContextManager.java:453)
> 	at org.apache.tomcat.startup.Tomcat.execute(Tomcat.java:195)
> 	at org.apache.tomcat.startup.Tomcat.main(Tomcat.java:240)

Mime
View raw message