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:
- Log4j 1.2.17
- Apache OpenJPA 2.2.1
- Commons Configuration 1.9
- Commons Pool 1.6
- Postgresql 9.1-901jdbc4
- imgscalr-lib-4.2
Can anyone see a correlation between the libraries and the error? I really don't have an idea anymore.