Attaching clhsdb to a simple HelloWorld program and executing the 'printall' command results in ClassCastException being thrown multiple times.
=========snippet from the printall output===============
Constant Pool^M
Constant Pool of [final class java.lang.invoke.MethodTypeForm @0x00000007c004bd68] @0x00007f8ed145cea8^M
java.lang.ClassCastException: jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjArrayKlass cannot be cast to jdk.hotspot.agent/sun.jvm.hotspot.oops.InstanceKlass^M
at jdk.hotspot.agent/sun.jvm.hotspot.oops.ConstantPool.getFieldOrMethodKlassRefAt(ConstantPool.java:338)^M
at jdk.hotspot.agent/sun.jvm.hotspot.oops.ConstantPool.getMethodRefAt(ConstantPool.java:343)^M
at jdk.hotspot.agent/sun.jvm.hotspot.interpreter.BytecodeInvoke.getInvokedMethod(BytecodeInvoke.java:73)^M
at jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser.HTMLGenerator$1.visit(HTMLGenerator.java:699)^M
at jdk.hotspot.agent/sun.jvm.hotspot.interpreter.BytecodeDisassembler.decode(BytecodeDisassembler.java:156)^M
at jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser.HTMLGenerator.genHTML(HTMLGenerator.java:651)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$19$1.visit(CommandProcessor.java:898)^M
at jdk.hotspot.agent/sun.jvm.hotspot.memory.SystemDictionary$2.visit(SystemDictionary.java:179)^M
at jdk.hotspot.agent/sun.jvm.hotspot.memory.Dictionary.classesDo(Dictionary.java:68)^M
at jdk.hotspot.agent/sun.jvm.hotspot.memory.SystemDictionary.classesDo(SystemDictionary.java:190)^M
at jdk.hotspot.agent/sun.jvm.hotspot.memory.SystemDictionary.allClassesDo(SystemDictionary.java:183)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$19.doit(CommandProcessor.java:891)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:1963)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:1933)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.run(CommandProcessor.java:1813)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:99)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:40)^M
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:191)^M
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:439)^M
0x00007f8ed145f958 45^M
=========snippet from the printall output===============
Constant Pool^M
Constant Pool of [final class java.lang.invoke.MethodTypeForm @0x00000007c004bd68] @0x00007f8ed145cea8^M
java.lang.ClassCastException: jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjArrayKlass cannot be cast to jdk.hotspot.agent/sun.jvm.hotspot.oops.InstanceKlass^M
at jdk.hotspot.agent/sun.jvm.hotspot.oops.ConstantPool.getFieldOrMethodKlassRefAt(ConstantPool.java:338)^M
at jdk.hotspot.agent/sun.jvm.hotspot.oops.ConstantPool.getMethodRefAt(ConstantPool.java:343)^M
at jdk.hotspot.agent/sun.jvm.hotspot.interpreter.BytecodeInvoke.getInvokedMethod(BytecodeInvoke.java:73)^M
at jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser.HTMLGenerator$1.visit(HTMLGenerator.java:699)^M
at jdk.hotspot.agent/sun.jvm.hotspot.interpreter.BytecodeDisassembler.decode(BytecodeDisassembler.java:156)^M
at jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser.HTMLGenerator.genHTML(HTMLGenerator.java:651)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$19$1.visit(CommandProcessor.java:898)^M
at jdk.hotspot.agent/sun.jvm.hotspot.memory.SystemDictionary$2.visit(SystemDictionary.java:179)^M
at jdk.hotspot.agent/sun.jvm.hotspot.memory.Dictionary.classesDo(Dictionary.java:68)^M
at jdk.hotspot.agent/sun.jvm.hotspot.memory.SystemDictionary.classesDo(SystemDictionary.java:190)^M
at jdk.hotspot.agent/sun.jvm.hotspot.memory.SystemDictionary.allClassesDo(SystemDictionary.java:183)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$19.doit(CommandProcessor.java:891)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:1963)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:1933)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.run(CommandProcessor.java:1813)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:99)^M
at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:40)^M
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:191)^M
at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:439)^M
0x00007f8ed145f958 45^M
- relates to
-
JDK-8261857 serviceability/sa/ClhsdbPrintAll.java failed with "Test ERROR java.lang.RuntimeException: 'cannot be cast to' found in stdout"
-
- Resolved
-