tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Ohlén <l...@ohlen.se>
Subject Re: Tomcat 5: the classloader mystery
Date Thu, 29 Apr 2004 18:45:29 GMT
Well,

I have read the documentation and I agree it seams to be complete.

I have some common utility code that is used by all webapps. The code
is contained in some .jar files and some classes. I placed this code in
the shared\lib and shared\classes directory wich accordning to the
documentation is the correct place. But my Servlets cannot find
these files.

There is more to it than this.

The servlets invokes EJB that is hosted by an appserver. Therefore
I had to add the appserver specific classes and .jar files to the CLASSPATH
variable. I made these changes in the setclasspath.sh file

This configuration does not work.

If add the shared \lib .jar files and shared\classes to the CLASSPATH
variable it works.

Perhaps this has something to do with how the classloaders are organized and
how they delegate the
work amongs theme. And one of the thing might be that the jar files (that I
orginally placed in shared\lib) has
dependencies to the classes defined in the CLASSPATH.

My solution works but seams to break the intention of the Tomcat
architecure.

/Lars
















----- Original Message ----- 
From: "Mike Curwen" <gb_dev@gb-im.com>
To: "'Tomcat Users List'" <tomcat-user@jakarta.apache.org>
Sent: Wednesday, April 28, 2004 11:30 PM
Subject: RE: Tomcat 5: the classloader mystery


> I would appreciate if someone could explain the Tomcat classloader
secrets.

That makes people think you didn't read the docs, because they are quite
complete in this regards.  And it's been put to the test to such an
extent that it's almost inconceivable that it's a genuine TC classloader
bug. ;)

So the question comes back to:
  what classdef is not being found?
  who (what code) is using it?  (your code, tomcat, etc)

> If I modify the setclasspath.sh file....
You're sure you've set this back the way it's supposed to be, and you
are 100% sure there are no duplicate jars/classes left lying around by
accident? (check in your jdk/jre ext directories, heck, search for *.jar
on your machine and make *sure*).

> ... I think my setup is according to that. (classloader docs)
 more info please.  What jars, used by what code, are being placed in
what directories?

> But it does not work

stacktrace ?






> -----Original Message-----
> From: Lars Ohlén [mailto:lars@ohlen.se]
> Sent: Wednesday, April 28, 2004 4:04 PM
> To: Tomcat Users List
> Subject: Re: Tomcat 5: the classloader mystery
>
>
> Perhaps my question was not clear.
> I have read the documentatation and I think my setup is
> according to that. But it does not work.
>
>
>
>
>
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org



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