You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Brian Wolf <br...@knowledgextensions.com> on 2002/07/11 23:12:15 UTC

newbie - finding class files

Hi

I am having problems with  servlets finding class files. On Windows 98 
I have the classpath and path environmental variables set to c:\jdk1.4\bin 
and c:\jdk1.4 respectively. The Servlet works fine when converted to a
command line application.

-Brian

---
 

Error: 500
Location: /examples/servlet/processOptions
Internal Servlet Error:

java.lang.NoClassDefFoundError: com/sun/java/util/collections/AbstractSequentialList
 at org.jdom.input.SAXBuilder.createContentHandler(SAXBuilder.java)
 at org.jdom.input.SAXBuilder.build(SAXBuilder.java)



RE: newbie - finding class files

Posted by Andreas Probst <an...@gmx.net>.
Hi all,

does Tomcat really look into tomcatdir/server/lib? For me it seems Tomcat doesn't. 

On the one hand the original webapp /webdav runs without errors. On the other hand, 
when I deploy a class that extends the original webdav-class 
org.apache.catalina.servlets.WebdavServlet (located in 
catalinahome\server\lib\servlets-webdav.jar) I get an java.lang.NoClassDefFoundError: 
org/apache/catalina/servlets/WebdavServlet.

When I then copy catalinahome\server\lib\servlets-webdav.jar into 
catalinahome\webapps\mywebdav\WEB-INF\lib I get a different 
java.lang.NoClassDefFoundError: org/apache/catalina/servlets/DefaultServlet. 
DefaultServlet is located in catalinahome\server\lib\servlets-default.jar. So it 
seems Tomcat doesn't look into the catalinahome\server\lib\ directory. But why then 
runs the original /webdav app?

What do I do wrong? Do I have to tell Tomcat somehow to look into the 
catalinahome\server\lib\ directory when running my webapp? Or do I have to copy all 
needed files from catalinahome\server\lib\ to my webapp's lib-directory? I suppose 
this shouldn't be the solution.

By the way: I'm running Tomcat 4.0.4 on Windows 2000.

Thanks a lot in advance.

Andreas Probst

> Brian,
> 
> Tomcat looks for your classes under
> Tomcatdir/webapps/yourapp/WEB-INF/classes and Tomcatdir/common/classes and
> looks for your jars in Tomcatdir/webapps/yourapp/WEB-INF/lib ,
> Tomcatdir/common/lib (and Tomcatdir/server/lib but you shouldn't put your
> stuff in here)
> 
> Andy
> 
> > -----Original Message-----
> > From: Brian Wolf [mailto:brianw@knowledgextensions.com]
> > Sent: 11 July 2002 22:12
> > To: Tomcat Users List
> > Subject: newbie - finding class files
> >
> >
> > Hi
> >
> > I am having problems with  servlets finding class files. On Windows 98
> > I have the classpath and path environmental variables set to
> > c:\jdk1.4\bin
> > and c:\jdk1.4 respectively. The Servlet works fine when converted to a
> > command line application.
> >
> > -Brian
> >
> > ---
> >
> >
> > Error: 500
> > Location: /examples/servlet/processOptions
> > Internal Servlet Error:
> >
> > java.lang.NoClassDefFoundError:
> > com/sun/java/util/collections/AbstractSequentialList
> >  at org.jdom.input.SAXBuilder.createContentHandler(SAXBuilder.java)
> >  at org.jdom.input.SAXBuilder.build(SAXBuilder.java)
> >
> >
> >
> 
> 
> 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: newbie - finding class files

Posted by Andy Eastham <an...@gliant.com>.
Brian,

Tomcat looks for your classes under
Tomcatdir/webapps/yourapp/WEB-INF/classes and Tomcatdir/common/classes and
looks for your jars in Tomcatdir/webapps/yourapp/WEB-INF/lib ,
Tomcatdir/common/lib (and Tomcatdir/server/lib but you shouldn't put your
stuff in here)

Andy

> -----Original Message-----
> From: Brian Wolf [mailto:brianw@knowledgextensions.com]
> Sent: 11 July 2002 22:12
> To: Tomcat Users List
> Subject: newbie - finding class files
>
>
> Hi
>
> I am having problems with  servlets finding class files. On Windows 98
> I have the classpath and path environmental variables set to
> c:\jdk1.4\bin
> and c:\jdk1.4 respectively. The Servlet works fine when converted to a
> command line application.
>
> -Brian
>
> ---
>
>
> Error: 500
> Location: /examples/servlet/processOptions
> Internal Servlet Error:
>
> java.lang.NoClassDefFoundError:
> com/sun/java/util/collections/AbstractSequentialList
>  at org.jdom.input.SAXBuilder.createContentHandler(SAXBuilder.java)
>  at org.jdom.input.SAXBuilder.build(SAXBuilder.java)
>
>
>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>