tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shapira, Yoav" <Yoav.Shap...@mpi.com>
Subject RE: Tomcat classpath issues.
Date Tue, 03 Jun 2003 12:50:29 GMT

Howdy,
This comes up all the time.  If I had a bit of money for every time I've
explained the difference between a ClassNotFoundException and a
NoClassDefFoundError...

Search the archives on this issue.

Furthermore, there are postings to the effect of "the weblogic.jar is a
giant piece of kludge that should never be dropped as-is into any
non-Weblogic servlet/J2EE container".  So figure out what you need from
this jar, extract those classes, and repackage them into another jar
which you can then put somewhere in your tomcat server.  For example,
old versions of weblogic.jar contained the javax.servlet classes, which
would result in this error you're seeing.

Finally, the classpath is documented here:
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/class-loader-howto.html

Yoav Shapira
Millennium ChemInformatics


>-----Original Message-----
>From: John Turner [mailto:tomcat-user@johnturner.com]
>Sent: Tuesday, June 03, 2003 8:35 AM
>To: Tomcat Users List
>Subject: Re: Tomcat classpath issues.
>
>
>java.lang.NoClassDefFoundError (what you're getting) is not the same as
>java.lang.ClassNotFoundException (what happens when classes can't be
found
>by the class loader).
>
>$CATALINA_HOME/common/lib is most definitely visible to your
applications.
>
>I'm no guru, but I think this has come up before, as recent as last
week or
>the week before.  Searching the archives might help until one of the
gurus
>can answer better than I can.
>
>John
>
>On Tue, 03 Jun 2003 01:30:55 -0400, Rodney Leger <jediknight@iname.com>
>wrote:
>
>> Does anyone know how to get the entire class path that tomcat is
using to
>> run an application.  What I am trying to understand is at the time
that
>> the tomcat is running my application what is its classpath.  I have
>> included a jar file(weblogic.jar) in common/lib however, I still
receive
>> the following message.
>>
>>
>> Since tomcat does not seem to be reading the data stored in
weblogic.jar.
>> I have verifed that the jar file is in common/lib but this doesn't
seem
>> to help.
>>
>> Thanks-
>> Rodney
>>
>>
>> javax.servlet.ServletException: Invoker service() exception
>> 	at
>>
>org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet
.jav
>a:516)
>> 	at
>>
>org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:1
80)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> 	at
>>
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
atio
>nFilterChain.java:247)
>> 	at
>>
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terC
>hain.java:193)
>> 	at
>>
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.j
>ava:260)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>> 	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>> 	at
>>
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.j
>ava:191)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>> 	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>> 	at
>>
>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23
96)
>> 	at
>>
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:18
>0)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>> 	at
>>
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
alve
>.java:170)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:641)
>> 	at
>>
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:17
>2)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:641)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>> 	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>> 	at
>>
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.jav
>a:174)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>> 	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>> 	at
>>
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>> 	at
>>
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:4
05)
>> 	at
>>
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Conn
>ection(Http11Protocol.java:380)
>> 	at
>>
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
08)
>> 	at
>>
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.ja
>va:533)
>> 	at java.lang.Thread.run(Thread.java:536)
>>
>> root cause
>>
>> java.lang.NoClassDefFoundError: weblogic/rmi/extensions/server/Stub
>> 	at java.lang.ClassLoader.defineClass0(Native Method)
>> 	at java.lang.ClassLoader.defineClass(ClassLoader.java:502)
>> 	at
>>
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:123)
>> 	at
>>
>weblogic.utils.classloaders.GenericClassLoader.findLocalClass(GenericCl
assL
>oader.java:431)
>> 	at
>>
>weblogic.utils.classloaders.GenericClassLoader.findClass(GenericClassLo
ader
>.java:169)
>> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:299)
>> 	at java.lang.ClassLoader.loadClass(ClassLoader.java:255)
>> 	at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:315)
>> 	at java.lang.Class.forName0(Native Method)
>> 	at java.lang.Class.forName(Class.java:217)
>> 	at
>>
>weblogic.utils.classfile.utils.CodeGenerator.generateClass(CodeGenerato
r.ja
>va:71)
>> 	at
>>
weblogic.rmi.internal.StubGenerator.getStubClass(StubGenerator.java:672)
>> 	at
>>
weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:712)
>> 	at
>>
weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:699)
>> 	at
weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:76)
>> 	at
>>
>weblogic.jndi.WLInitialContextFactoryDelegate.newRootNamingNodeStub(WLI
niti
>alContextFactoryDelegate.java:486)
>> 	at
>>
>weblogic.jndi.WLInitialContextFactoryDelegate.newRemoteContext(WLInitia
lCon
>textFactoryDelegate.java:449)
>> 	at
>>
>weblogic.jndi.WLInitialContextFactoryDelegate.newContext(WLInitialConte
xtFa
>ctoryDelegate.java:345)
>> 	at
>>
>weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLIniti
alCo
>ntextFactoryDelegate.java:308)
>> 	at
>>
>weblogic.jndi.WLInitialContextFactoryDelegate.getInitialContext(WLIniti
alCo
>ntextFactoryDelegate.java:234)
>> 	at
>>
>weblogic.jndi.WLInitialContextFactory.getInitialContext(WLInitialContex
tFac
>tory.java:135)
>> 	at
>>
javax.naming.spi.NamingManager.getInitialContext(NamingManager.java:662)
>> 	at
>>
javax.naming.InitialContext.getDefaultInitCtx(InitialContext.java:243)
>> 	at javax.naming.InitialContext.init(InitialContext.java:219)
>> 	at javax.naming.InitialContext.(InitialContext.java:195)
>> 	at
>>
>examples.helloworld.HelloWorldServletEJB.doGet(HelloWorldServletEJB.jav
a:64
>)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> 	at
>>
>org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet
.jav
>a:458)
>> 	at
>>
>org.apache.catalina.servlets.InvokerServlet.doGet(InvokerServlet.java:1
80)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>> 	at
>>
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applic
atio
>nFilterChain.java:247)
>> 	at
>>
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFil
terC
>hain.java:193)
>> 	at
>>
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVal
ve.j
>ava:260)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>> 	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>> 	at
>>
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextVal
ve.j
>ava:191)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>> 	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>> 	at
>>
>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:23
96)
>> 	at
>>
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.jav
a:18
>0)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>> 	at
>>
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherV
alve
>.java:170)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:641)
>> 	at
>>
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.jav
a:17
>2)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:641)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>> 	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>> 	at
>>
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve
.jav
>a:174)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.
invo
>keNext(StandardPipeline.java:643)
>> 	at
>>
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
480)
>> 	at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
>> 	at
>>
org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
>> 	at
>>
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:4
05)
>> 	at
>>
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process
Conn
>ection(Http11Protocol.java:380)
>> 	at
>>
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:5
08)
>> 	at
>>
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPoo
l.ja
>va:533)
>> 	at java.lang.Thread.run(Thread.java:536)
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
>>
>>
>
>
>
>--
>Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-user-help@jakarta.apache.org




This e-mail, including any attachments, is a confidential business communication, and may
contain information that is confidential, proprietary and/or privileged.  This e-mail is intended
only for the individual(s) to whom it is addressed, and may not be saved, copied, printed,
disclosed or used by anyone else.  If you are not the(an) intended recipient, please immediately
delete this e-mail from your computer system and notify the sender.  Thank you.


---------------------------------------------------------------------
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