You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Venkata Pavan Kumar Sannisetty <su...@gmail.com> on 2012/06/10 07:07:56 UTC
ClassNotFoundException Error in Tomcat 5.5 and Tomcat 6.0
I am having this strange issue with the tomcat 5.5 and tomcat 6.0 servers.
I have two web applications which will be installed on tomcat.When tomcat
is started these two web applications also get started simultaneously but
sometimes one web application fails to initialize because of the init
failure in one application another application is getting
classnotfoundexception errors while running. In tomcat 7.0 the application
is running fine even if the other application failed to initialize.
After some debugging i came to know there is one jar named crystal.jar
which is in the web-inf/lib folder of both applications. I have moved the
jar to common/lib folder of tomcat then it started working fine. I want to
know why it is working fine in tomcat 7.0 not in tomcat 5.x and tomcat 6.x
versions. Is there any change in classloading architecture between these
versions ?
Thanks
Pavan.
Re: ClassNotFoundException Error in Tomcat 5.5 and Tomcat 6.0
Posted by Venkata Pavan Kumar Sannisetty <su...@gmail.com>.
Thanks a Lot.
On 10 June 2012 14:29, Konstantin Kolinko <kn...@gmail.com> wrote:
> 2012/6/10 Venkata Pavan Kumar Sannisetty <su...@gmail.com>:
> > Hi Konstantin Kolinko,
> >
> > Thanks for the response.
> >
> > Can you point out some reference where i can know about this permgen
> memory
> > leak. I am unable to find good article/material on it to understand
> furthur.
> >
>
> It should be somewhere here:
>
> 1)
> http://people.apache.org/~markt/presentations/
> 2010-08-05-Memory-Leaks-JavaOne-60mins.pdf
> 2010-11-04-Memory-Leaks-60mins.pdf
>
> 2)
> http://eclipse.org/mat/
>
> 3)
> http://wiki.apache.org/tomcat/FAQ/Troubleshooting_and_Diagnostics
> http://wiki.apache.org/tomcat/MemoryLeakProtection
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: ClassNotFoundException Error in Tomcat 5.5 and Tomcat 6.0
Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/6/10 Venkata Pavan Kumar Sannisetty <su...@gmail.com>:
> Hi Konstantin Kolinko,
>
> Thanks for the response.
>
> Can you point out some reference where i can know about this permgen memory
> leak. I am unable to find good article/material on it to understand furthur.
>
It should be somewhere here:
1)
http://people.apache.org/~markt/presentations/
2010-08-05-Memory-Leaks-JavaOne-60mins.pdf
2010-11-04-Memory-Leaks-60mins.pdf
2)
http://eclipse.org/mat/
3)
http://wiki.apache.org/tomcat/FAQ/Troubleshooting_and_Diagnostics
http://wiki.apache.org/tomcat/MemoryLeakProtection
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org
Re: ClassNotFoundException Error in Tomcat 5.5 and Tomcat 6.0
Posted by Venkata Pavan Kumar Sannisetty <su...@gmail.com>.
Hi Konstantin Kolinko,
Thanks for the response.
Can you point out some reference where i can know about this permgen memory
leak. I am unable to find good article/material on it to understand furthur.
Thanks,
Pavan.
On 10 June 2012 06:59, Konstantin Kolinko <kn...@gmail.com> wrote:
> 2012/6/10 Venkata Pavan Kumar Sannisetty <su...@gmail.com>:
> > I am having this strange issue with the tomcat 5.5 and tomcat 6.0
> servers.
> > I have two web applications which will be installed on tomcat.When tomcat
> > is started these two web applications also get started simultaneously but
> > sometimes one web application fails to initialize because of the init
> > failure in one application another application is getting
> > classnotfoundexception errors while running. In tomcat 7.0 the
> application
> > is running fine even if the other application failed to initialize.
> >
> > After some debugging i came to know there is one jar named crystal.jar
> > which is in the web-inf/lib folder of both applications. I have moved the
> > jar to common/lib folder of tomcat then it started working fine. I want
> to
> > know why it is working fine in tomcat 7.0 not in tomcat 5.x and tomcat
> 6.x
> > versions. Is there any change in classloading architecture between these
> > versions ?
>
> Guessing on a crystal jar^H^H^H ball,..
>
> There exist a known kind of PermGen memory leaks, when a library class
> is referenced by a system class and thus lives beyond its age. One
> example is when Java discovers a JDBC driver, or some other service
> and "automatically registers" it. It keeps reference to it in a
> system, but the class itself belongs to the web application and has to
> be unloaded when application stops - but cannot, because of that
> reference. Not all such references are easy to clear.
>
> One typical symptom in such a case is that the first web application
> that relies on this system feature will succeed, but the second and
> other ones will fail (because the service that is registered in the
> system belongs to first web application and cannot see classes from
> classloader of the second application and vice versa).
>
> Tomcat 7 and recent versions of Tomcat 6 have better protection
> against certain known PermGen memory leaks in their default
> configuration.
>
> Tomcat 5.5 does not have such protection at all.
>
> Best regards,
> Konstantin Kolinko
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: users-help@tomcat.apache.org
>
>
Re: ClassNotFoundException Error in Tomcat 5.5 and Tomcat 6.0
Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/6/10 Venkata Pavan Kumar Sannisetty <su...@gmail.com>:
> I am having this strange issue with the tomcat 5.5 and tomcat 6.0 servers.
> I have two web applications which will be installed on tomcat.When tomcat
> is started these two web applications also get started simultaneously but
> sometimes one web application fails to initialize because of the init
> failure in one application another application is getting
> classnotfoundexception errors while running. In tomcat 7.0 the application
> is running fine even if the other application failed to initialize.
>
> After some debugging i came to know there is one jar named crystal.jar
> which is in the web-inf/lib folder of both applications. I have moved the
> jar to common/lib folder of tomcat then it started working fine. I want to
> know why it is working fine in tomcat 7.0 not in tomcat 5.x and tomcat 6.x
> versions. Is there any change in classloading architecture between these
> versions ?
Guessing on a crystal jar^H^H^H ball,..
There exist a known kind of PermGen memory leaks, when a library class
is referenced by a system class and thus lives beyond its age. One
example is when Java discovers a JDBC driver, or some other service
and "automatically registers" it. It keeps reference to it in a
system, but the class itself belongs to the web application and has to
be unloaded when application stops - but cannot, because of that
reference. Not all such references are easy to clear.
One typical symptom in such a case is that the first web application
that relies on this system feature will succeed, but the second and
other ones will fail (because the service that is registered in the
system belongs to first web application and cannot see classes from
classloader of the second application and vice versa).
Tomcat 7 and recent versions of Tomcat 6 have better protection
against certain known PermGen memory leaks in their default
configuration.
Tomcat 5.5 does not have such protection at all.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org