tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Larry Isaacs <Larry.Isa...@sas.com>
Subject RE: ClassNotFoundException when using war file (Tomcat 3.2.3)
Date Thu, 01 Nov 2001 15:03:29 GMT
So far, I haven't had any fundamental problems with using
jar files in WEB-INF/lib, though there can always be issues.
For example, in Tomcat 3.2.x, there are problems if your
web app wants an XML parser different from the one being
used by the server.

There is one very big difference between Tomcat 3.x and Tomcat 4.x
with respect to class loading.  Tomcat 3.x follows the JDK
behavior where classloaders delegate to their parent classloader
first before searching their own classes.  Tomcat 4.x follows
the recommendation in the Servlet 2.3 spec that classloaders
search their own classes first before delegating.  It is
possible your web application is happier in this latter
environment and needs some work to get it to work in the
former.

Cheers,
Larry

> -----Original Message-----
> From: Abinesh S Puthenpurackal 
> [mailto:abinesh.puthenpurackal@sdrc.com]
> Sent: Thursday, November 01, 2001 9:34 AM
> To: Tomcat Users List
> Subject: Re: ClassNotFoundException when using war file (Tomcat 3.2.3)
> 
> 
> I got my web application to work in tomcat 4.0.1 (Catalina). 
> In Tomcat 4.0.1, the
> order of the contents in the web.xml seems to matter (E.g. 
> All <servlet> definition
> must be before the <servlet-mapping> etc.). Except for the 
> change in the web.xml,
> my war seems to working in Tomcat 4.0.1. This makes me wonder 
> if the feature of
> loading the classes from jar files in WEB-INF/lib/ was fully 
> functional in 3.2.3
> release at all !!!. Has anyone had any success with this in 
> Tomcat 3.2.3 ?
> 
> Thanks
> 
> Abi -
> 
> Paul DuBois wrote:
> 
> > >The examples that gets shipped with the tomcat.zip file 
> also uses Web-inf !!!!
> >
> > Maybe the developers never used anything but Windows boxes
> > (case-insensitive file system)?
> >
> > >
> > >scarcher@its.state.ms.us wrote:
> > >
> > >>  I'm new to tomcat but shouldn't it bet WEB-INF?
> > >>  isn't it case sensitive?
> > >>
> > >>  Scott Archer
> > >>  scarcher@its.state.ms.us
> > >>
> > >>
> > >>                      Abinesh S
> > >>                      Puthenpurackal                To:
> > >>tomcat-user@jakarta.apache.org
> > >>                      <abinesh.puthenpurackal       cc:
> > >>                      @sdrc.com>                    Subject:
> > >>ClassNotFoundException when using war file (Tomcat 3.2.3)
> > >>
> > >>                      10/31/2001 09:45 AM
> > >>                      Please respond to
> > >>                      "Tomcat Users List"
> > >>
> > >>
> > >>
> > >>  Hi,
> > >>
> > >>  I am trying to use a war which has some jar files in it 
> for my web
> > >>  application in tomcat 3.2.3. The war file is structured 
> as follows
> > >>
> > >>  WarFile.war
> > >>      Web-inf/lib/jarfile1.jar
> > >>      Web-inf/lib/jarfile2.jar
> > >>      Web-inf/lib/jarfile3.jar
> > >>
> > >>  When running the application I get 
> ClassNotFoundException for the
> > >>  classes in the jar file. Also I noticed that empty 
> directories (that
> > >>  follows my package structure) were created under lib 
> directory. E.g. I
> > >>  see the following empty directories
> > >>
> > >>  
> %TOMCAT_HOME%/webapps/webapplication/Web-inf/lib/examples/addr
> essbook/.....
> > >>
> > >>  A workaround is to place the jar files in the 
> tomcat/lib directory. This
> > >>  will result in the the jars to be added to the 
> classpath and everything
> > >>  works fine.
> > >>
> > >>  I was wondering if anyone knows about a cleaner 
> solution or point out if
> > >>  there is something that I need to do to get this 
> working (perhaps
> > >>  something in manifest file or web.xml file etc.).
> > >>
> > >>  Any help is greatly appreciated.
> > >>
> > >>  Thanks,
> > >>
> > >>  Abi -
> > >>
> > >>  --
> > >>  To unsubscribe, e-mail:
> > >><mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > >>  For additional commands, e-mail:
> > >><mailto:tomcat-user-help@jakarta.apache.org>
> > >
> > >
> > >--
> > >To unsubscribe, e-mail:   
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > >For additional commands, e-mail: 
> <mailto:tomcat-user-help@jakarta.apache.org>
> >
> > --
> > To unsubscribe, e-mail:   
> <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: 
> <mailto:tomcat-user-help@jakarta.apache.org>
> 
> 
> --
> To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
> Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>
> 

--
To unsubscribe:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands: <mailto:tomcat-user-help@jakarta.apache.org>
Troubles with the list: <mailto:tomcat-user-owner@jakarta.apache.org>


Mime
View raw message