tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pid <>
Subject Re: Classloading
Date Mon, 28 Jun 2010 13:27:16 GMT
On 28/06/2010 14:14, Peter Crowther wrote:
> On 28 June 2010 14:07, Ockleford Paul (NHS Connecting for Health) <
>> wrote:
>> Pretty much and I don't know the reason why that is, I am not in charge of
>> the linux servers I only started looking into it because I couldn't get my
>> method to work but it worked on my local windows environment. The entire web
>> app is classes so its actually a class in WEB-INF\classes, that for some
>> unknown reason the entire package is also sym linked in
>> tomcat\common\classes.
>> Can you think of any reason why someone would do that? I can only assume
>> that at some point in the past someone else has had classloading issues and
>> decided that that hack would solve it. That is unconfirmed though.
> Another option would be if two different webapps "need" to share static
> variables (such as a singleton) in a common class.  At that point, the
> common class must only be loaded once, so must be in common (or higher).

... all of which means that you have a broken & fragile Tomcat.

The same class may not be in two places in the classloader tree.  As
you've discovered, someone botched a fix and stored up a problem for
someone else to find later.

I strongly recommend that you examine what's happening and remove the
symlink(s).  Either put the classes in the common classloader, or put
them in the web app - but not both.


View raw message