When using VisualVM for cpu-profiling of my application, I run into the error
"Profiler Agent Error: with message: Redefinition failed with error 66".
Upon that, it copies all the class-files from the build path to the location I've started the application from.
I tried to find some information on it, the error code means (According to JVMTI-documentation):
JVMTI_ERROR_UNSUPPORTED_REDEFINITION_HIERARCHY_CHANGED (66)
A direct superclass is different for the new class version, or the set of directly implemented interfaces is different.
As profiling usually works in my environment (Java build 1.7.0_09-b05, Fedora 17 64-bit). I've tried "-Xshare:off" as said in the Visualvm-docs, without any effect.
As this is the only Java-SE application I'm experiencing this problem with, it seems that it is somehow related to the libraries I'm using. The following are in my classpath:
Can anyone see a correlation between the libraries and the error? I really don't have an idea anymore.
It looks like this can be caused by JPA. You can use Sampler
instead of Profiler
. Another possibility is to define root methods and instrumentation filter so that classes instrumented by JPA are not profiled by VisualVM. See Profiling With VisualVM, Part 1 and Profiling With VisualVM, Part 2 to get more information about profiling and how to set profiling roots and instrumentation filter.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With