If SA connector is used and debugger tries to use MonitorInfo provided by ThreadReference.ownedMonitorsAndFrames() ClassCastException is thrown:
java.lang.ClassCastException: sun.jvm.hotspot.jdi.MonitorInfoImpl cannot be cast to com.sun.jdi.MonitorInfo
To reproduce run script from attached archive:
>> run_sajdi.sh <path to the tested java> test05.Debuggee test05.Debugger
Example of test run:
>> run_sajdi.sh /set/vmsqe/jdk/7/build/latest/linux-i586/ test05.Debuggee test05.Debugger
Running debuggee: /set/vmsqe/jdk/7/build/latest/linux-i586//bin/java test05.Debuggee
Waiting debuggee
test05.Debuggee: READY!
Running debugger: /set/vmsqe/jdk/7/build/latest/linux-i586//bin/java test05.Debugger sapid 11891
Thread
- name: QWE
- isSuspended: true
ownedMonitorsAndFrames: 1
java.lang.ClassCastException: sun.jvm.hotspot.jdi.MonitorInfoImpl cannot be cast to com.sun.jdi.MonitorInfo
at test05.Debugger.print(Debugger.java:72)
at test05.Debugger.main(Debugger.java:42)
Killing debuggee