You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Mario Koch <m....@bis.de> on 2001/04/13 23:03:51 UTC

is this a BUG at class loading from jarfiles

Situation:

I have several webapplications that using the same jar filename.

webapps/app.new/WEB-INF/lib/javaserver.jar
webapps/app.stable/WEB-INF/lib/javaserver.jar
webapps/app.test/WEB-INF/lib/javaserver.jar

these jarfiles are different

Problem:

if i access the webapplication with http://localhost:8080/app.stable/xxx.jsp
the classloader
will use the jarfile located in webapps/app.new/WEB-INF/javaserver.jar

if i delete the javaserver.jar in webapps/app.stable/WEB-INF/lib/ then i get
an noclassdevfound exception

if i delete the javaserver.jar in webapps/app.new/WEB-INF/lib/ then it works

if i rename all javaserver.jar files to different names like this
webapps/app.new/WEB-INF/lib/javaserver1.jar
webapps/app.stable/WEB-INF/lib/javaserver2.jar
webapps/app.test/WEB-INF/lib/javaserver3.jar
then all applications will work

for me it seems that the classloader loads the class from the javaserver.jar
file it found first in the filesystem





Re: is this a BUG at class loading from jarfiles

Posted by Mario Koch <m....@bis.de>.
----- Original Message -----
From: "Craig R. McClanahan" <cr...@apache.org>
To: "Mario Koch" <m....@bis.de>
Cc: <to...@jakarta.apache.org>
Sent: Friday, April 13, 2001 11:09 PM
Subject: Re: is this a BUG at class loading from jarfiles


>
>
> On Fri, 13 Apr 2001, Mario Koch wrote:
>
> > Situation:
> >
> > I have several webapplications that using the same jar filename.
> >
> > webapps/app.new/WEB-INF/lib/javaserver.jar
> > webapps/app.stable/WEB-INF/lib/javaserver.jar
> > webapps/app.test/WEB-INF/lib/javaserver.jar
> >
> > these jarfiles are different
> >

Sorry my fault i delete the version line in this email (was late in the
night).
Yes iam using 4.0b3. and thank you the nightly build works fine.


>
> Is this Tomcat 4.0-beta-3?  If so, this bug has already been fixed, and
> you should grab the most recent nightly distribution.  Otherwise, please
> include the version number and submit a bug report to:
>
> http://nagoya.apache.org/bugzilla/
>
> Craig McClanahan
>


Re: is this a BUG at class loading from jarfiles

Posted by "Craig R. McClanahan" <cr...@apache.org>.

On Fri, 13 Apr 2001, Mario Koch wrote:

> Situation:
> 
> I have several webapplications that using the same jar filename.
> 
> webapps/app.new/WEB-INF/lib/javaserver.jar
> webapps/app.stable/WEB-INF/lib/javaserver.jar
> webapps/app.test/WEB-INF/lib/javaserver.jar
> 
> these jarfiles are different
> 

Is this Tomcat 4.0-beta-3?  If so, this bug has already been fixed, and
you should grab the most recent nightly distribution.  Otherwise, please
include the version number and submit a bug report to:

	http://nagoya.apache.org/bugzilla/

Craig McClanahan