JDK-6784510 : SA-JDI: can't use ThreadReference.ownedMonitorsAndFrames()
  • Type: Bug
  • Component: core-svc
  • Sub-Component: debugger
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: generic
  • CPU: generic
  • Submitted: 2008-12-12
  • Updated: 2023-12-14
  • Resolved: 2016-08-08
Related Reports
Relates :  
Description
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

Comments
Closing as WNF. Removing sajdi tests.
08-08-2016