This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
This is JDK 7 specific bug caused by more strict classfile verification for classes with version >= 51. Steps to reproduce. 1) Download latest JDK 7 build (tested with build 113) 2) add JDK 7 as Java platform in NetBeans 3) create AnagramGame project 4) set JDK 7 ad Java platform 5) set JDK 7 as Source/Binary Format 6) profile AnagramGame (CPU, default settings) 7) class instrumentation fails. See log below: Profiler Agent: Initializing... Profiler Agent: Options: >/home/thurka/Projects/netbeans_691/netbeans/profiler/lib,5140,10< Profiler Agent: Initialized successfully Profiler Agent: Waiting for connection on port 5140, timeout 10 seconds (Protocol version: 10) Profiler Agent: Established connection with the tool Profiler Agent: Local accelerated session Profiler Agent Error: Redefinition failed for classes: com.toy.anagrams.ui.Anagrams Profiler Agent Error: with message: Redefinition failed with error 62 Check JVMTI documentation for this error code. Debug: writing class file: com.toy.anagrams.ui.Anagrams, into file: com.toy.anagrams.ui.Anagrams.class
There is a easy workaround: run profiled application with -Xverify:none
Integrated into 'main-golden', will be available in build *201012100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/40857be8ceee User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #191297, update a local variable table when a class is instrumented
Created attachment 104787 [details] Sample project
Comment on attachment 104787 [details] Sample project should have been attached to a different issue
Integrated into 'main-golden', will be available in build *201101090000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/3ae4f288a8b5 User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #194076, #191297, update LocalVariableTypeTable attribute when a class is instrumented
Integrated into 'main-golden', will be available in build *201101190000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/43a5d34aa113 User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #191297, #194186, forgotten initialization of modifiledLocalVariableTypeTableOffsets added
Integrated into 'main-golden', will be available in build *201101290000* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/77b3a2b43586 User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #191297 update StackMapTable attribute when a class is instrumented
Integrated into 'main-golden', will be available in build *201102160501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/66bbeccf47a9 User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #195478, #191297, initialize modifiledStackMapTableOffsets
Integrated into 'main-golden', will be available in build *201102180501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/9c7e822f0d18 User: Tomas Hurka <thurka@netbeans.org> Log: bugfix #195477, #191297, insert StackMapTable attribute at the end of Code attribute
This issue can be finally closed as fixed. To work correctly, JDK 7 b134 or newer has to be used together with this fix in NetBeans Profiler 7.0.
*** Bug 198170 has been marked as a duplicate of this bug. ***
This still happens with NetBeans 8.1 on Java 8u72. The error appears occasionally while collecting profiling info.
The message "Profiler Agent Warning: JVMTI classLoadHook: class name is null." is dumped to stderr repeatedly when this happens.
(In reply to swpalmer from comment #12) > This still happens with NetBeans 8.1 on Java 8u72. The error appears > occasionally while collecting profiling info. Please file separate bug and don't forget to include steps how to reproduce it and messages.log. Thanks.