I am trying to use the classmexer to profile some instance memory runtime.I have set the following as Generic JVM arguments in Webshpere 6.1:
-javaagent:c:/Downloads/classmexer.jar
Follow开发者_如何学编程ing exception is thrown:
Caused by: java.lang.UnsatisfiedLinkError: sun/instrument/InstrumentationImpl.getObjectSize0(Ljava/lang/Object;)J at sun.instrument.InstrumentationImpl.getObjectSize(InstrumentationImpl.java:116) at com.javamex.classmexer.MemoryUtil.deepMemoryUsageOf0(MemoryUtil.java:178)
It works fine standalone though.
Any suggestions?
You have to copy the dependencies and classmexer to shared library directory, probably AppServer/lib/ext. The Exception is thrown because WAS doesn't search for everything required from the PATH set in your shell. That is why it still works as standalone.
精彩评论