You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Konstantin Kolinko <kn...@gmail.com> on 2010/04/07 02:48:35 UTC
Re: Major Tomcat classloading issues with javaagent command line
switch
2010/4/7 Arshan Dabirsiaghi <ar...@aspectsecurity.com>:
> Just to close the loop here, the problem was that the class was being loaded twice - once from inside the *agent* jar, and another duplicate later from WEB-INF/classes. I guess Tomcat or Java was confused as to which version they wanted to use. Not 100% sure what happened, but removing it from the agent jar fixed the problem.
The servlet spec requires that the webapp classes and libraries were
preferred over the ones provided by Tomcat. More details in [1] At
the same time, web applications are short-lived and can be stopped /
undeployed at any time, at which point their classloader and their
classes become unavailable. Using those for something that is
JVM-wide may lead to leaked memory at best, or do not work at all.
[1] http://tomcat.apache.org/tomcat-6.0-doc/class-loader-howto.html
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org