You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Michal Singer <Mi...@expand.com> on 2011/04/17 06:32:40 UTC
tomcat class loaders problem
Hi, I am using tomcat version: apache-tomcat-6.0.18
I have a problem on raise some times (hard to reproduce) where the tomcat creates two instances of the same class loader in one web application . Type of class loader: WebappClassLoader.
One of the two instances is also known inside another web application. So two web apps share the same instance of class loader and one of the web applications uses 2 instances, which as a result causes one class loader to not know some of the classes created by the other instance.
This causes many problems, for example" instanceof fails where it should succeed.
Note that the parent class loader is the same instance.
Does anyone know how to solve this problem? or how to work around it?
Please note that when I restart the tomcat, this does not happen anymore.
Thanks,
Michal Singer
Re: tomcat class loaders problem
Posted by Mark Thomas <ma...@apache.org>.
On 17/04/2011 08:54, Michal Singer wrote:
> Why do I need to upgrade the tomcat? Are there know issues concerning the class loader?
There are no known class loader issues with Tomcat but the memory leak
detection and prevention available in the later versions will probably
point out where the application is retaining a reference and triggering
a memory leak. If you are lucky it will be one of the leaks Tomcat fixes
automatically.
6.0.18 also has multiple security vulnerabilities that may affect you.
> It is a little complicated to upgrade tomcat at this stage of our production.
An upgrade to the latest 6.0.x should be relatively painless. It is
certainly worth considering. Failing that, take a look at this:
http://markmail.org/message/fcbvwapt6afyndxn
Mark
> thanks
>
> -----Original Message-----
> From: Pid [mailto:pid@pidster.com]
> Sent: א 17 אפריל 2011 10:44
> To: Tomcat Users List
> Subject: Re: tomcat class loaders problem
>
> On 4/17/11 5:32 AM, Michal Singer wrote:
>> Hi, I am using tomcat version: apache-tomcat-6.0.18
>
> Upgrade to a newer version of Tomcat 6 and then carefully monitor the logs during a webapp reload cycle.
>
>
> p
>
>> I have a problem on raise some times (hard to reproduce) where the tomcat creates two instances of the same class loader in one web application . Type of class loader: WebappClassLoader.
>> One of the two instances is also known inside another web application. So two web apps share the same instance of class loader and one of the web applications uses 2 instances, which as a result causes one class loader to not know some of the classes created by the other instance.
>> This causes many problems, for example" instanceof fails where it should succeed.
>>
>> Note that the parent class loader is the same instance.
>>
>> Does anyone know how to solve this problem? or how to work around it?
>>
>> Please note that when I restart the tomcat, this does not happen anymore.
>>
>>
>>
>>
>> Thanks,
>> Michal Singer
>>
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
RE: tomcat class loaders problem
Posted by Michal Singer <Mi...@expand.com>.
Why do I need to upgrade the tomcat? Are there know issues concerning the class loader?
It is a little complicated to upgrade tomcat at this stage of our production.
thanks
-----Original Message-----
From: Pid [mailto:pid@pidster.com]
Sent: א 17 אפריל 2011 10:44
To: Tomcat Users List
Subject: Re: tomcat class loaders problem
On 4/17/11 5:32 AM, Michal Singer wrote:
> Hi, I am using tomcat version: apache-tomcat-6.0.18
Upgrade to a newer version of Tomcat 6 and then carefully monitor the logs during a webapp reload cycle.
p
> I have a problem on raise some times (hard to reproduce) where the tomcat creates two instances of the same class loader in one web application . Type of class loader: WebappClassLoader.
> One of the two instances is also known inside another web application. So two web apps share the same instance of class loader and one of the web applications uses 2 instances, which as a result causes one class loader to not know some of the classes created by the other instance.
> This causes many problems, for example" instanceof fails where it should succeed.
>
> Note that the parent class loader is the same instance.
>
> Does anyone know how to solve this problem? or how to work around it?
>
> Please note that when I restart the tomcat, this does not happen anymore.
>
>
>
>
> Thanks,
> Michal Singer
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: tomcat class loaders problem
Posted by Pid <pi...@pidster.com>.
On 4/17/11 5:32 AM, Michal Singer wrote:
> Hi, I am using tomcat version: apache-tomcat-6.0.18
Upgrade to a newer version of Tomcat 6 and then carefully monitor the
logs during a webapp reload cycle.
p
> I have a problem on raise some times (hard to reproduce) where the tomcat creates two instances of the same class loader in one web application . Type of class loader: WebappClassLoader.
> One of the two instances is also known inside another web application. So two web apps share the same instance of class loader and one of the web applications uses 2 instances, which as a result causes one class loader to not know some of the classes created by the other instance.
> This causes many problems, for example" instanceof fails where it should succeed.
>
> Note that the parent class loader is the same instance.
>
> Does anyone know how to solve this problem? or how to work around it?
>
> Please note that when I restart the tomcat, this does not happen anymore.
>
>
>
>
> Thanks,
> Michal Singer
>
>