2008-09-12 11:59:44 UTC
Hi Thomas,
Profile.jar needs to be loaded by the Application classloader. The classes you want to profile may be loaded by a child classloader, but that should be ok.
JIP has 3 different phases:
1) Instrument
2) Profile
3) Output
In the Instrument phase, JIP has the ability to instrument any class, regardless of which classloader is loading it. During this phase, classes are instrumented to call the Profile class, which is assumed to be loaded by the Application Classloader, since this is how the javaagent interface works. If you see this exception:
java.lang.ClassNotFoundException: com.mentorgen.tools.profile.runtime.Profile
there are a couple of things to look at:
1) make sure that profile.jar is being loaded by the application classloader.
2) this is a kludge, but you might try putting another copy of profile.jar in the classpath for your plugin.
I want to make sure we can get this problem solved, so please let me know how things go.
Regards,
Andrew.