tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From John Baker <jba...@teamenergy.com>
Subject Re: Cannot find my JavaBeans
Date Wed, 18 Jul 2001 15:21:46 GMT
Ha! I've been getting this too! I posted about this last week.

Here is my posting:


Anyone ever experienced a problem where by if you try to run a Thread from an 
object implementing ServletContextListener (ie it's used to perform 'startup' 
stuff), the Thread is unable to find classes (complains of NoClassDefFound). 
Yet if the Thread is just run using the current Thread (ie call run, not 
start), the classes are magically found?


I *know* there are classes there, within the classpath, and I can create them 
happily. However if I run a Thread (and it works from a jsp, but not from an 
object that's an application listener) and try to create the object, ti fails.

Noone has found a solution for me yet :-)


On Wednesday 18 July 2001 15:44 pm, you wrote:
> Hi,
>
> your wish is my order :-) cocoon is a servlet that generates java code
> out of some sort of xml-files. The compile process is running inside the
> servlet. Compile is fine but if the servlet executes the generated
> class. The classpath is missing some jars that where present during
> compile. Its running fine if the jars are in $TOMCAT_HOME/lib.
>
>
> java.lang.ClassNotFoundException: xmlbeans.XmlBean
>               at
> org.apache.cocoon.processor.xsp.language.java.XSPClassLoader.loadClass(XSPC
>lassLoader.java:99) at
> java.lang.ClassLoader.loadClassInternal(ClassLoader.java)
>               at
> _usr._local._jakarta_tomcat_3_2_2._webapps._Projekte._xsp._page.<init>(_pag
>e.java) at
> org.apache.cocoon.processor.xsp.language.java.XSPJavaProcessor.load(XSPJava
>Processor.java:173) at
> org.apache.cocoon.processor.xsp.XSPProcessor.loadPage(XSPProcessor.java:542
>) at
> org.apache.cocoon.processor.xsp.XSPProcessor.process(XSPProcessor.java:390)
>               at org.apache.cocoon.Engine.handle(Engine.java:384)
>               at org.apache.cocoon.Cocoon.service(Cocoon.java:183)
>               at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>               at
> org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
>               at
> org.apache.tomcat.core.Handler.service(Handler.java:287)
>               at
> org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
>               at
> org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:7
>97) at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
>               at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnectio
>n(Ajp12ConnectionHandler.java:166) at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
>               at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
>               at java.lang.Thread.run(Thread.java)
>
> ---------------------------------------------------------------------------
>------
>
> Kind regards
>
> Michael

-- 
John Baker, BSc CS.
Java developer, Linux lover.
I don't wanna rock, DJ.

Mime
View raw message