Konstantin Kolinko skrev 2014-04-30 01:17:
2014-04-29 12:28 GMT+04:00 Fredrik <[email protected]>:
Hello.
We're using jamm (https://github.com/jbellis/jamm) a java agent for
measuring object memory usage, passing the javaagent argument
to tomcat as
"-javaagent:../../tomcat/webapps/ROOT/WEB-INF/lib/jamm-0.2.3.jar".
When running 7.0.50 everything works as expected but after upgrading to
7.0.52 the initialization code of the agent (premain-method) isn't called
anymore.
Any ideas?
I understand that that means that you have the same jar present in
both the System classloader and the Webapp classloader.
You should remove that jar from WEB-INF/lib directory of that webapp.
IIRC, in 7.0.50 and earlier Tomcat preferred the class from the system
classloader (effectively ignoring the webapp's jar).
In 7.0.52 it does load the class provided by web application.
Best regards,
Konstantin Kolinko
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
I only have one jar which is placed at
(webapps/ROOT/WEB-INF/lib/jamm-0.2.3.jar).
A little bit strange but when I moved the jar to tomcat/lib then the
agent starts working as expected.
Regards
/Fredrik
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]