-
Notifications
You must be signed in to change notification settings - Fork 959
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String #333
Comments
Could you share the method source causing this problem? |
Source here. package com.sun.btrace.samples; import com.sun.btrace.annotations.; @btrace(unsafe=true) public class AllMethods {
} |
I guess |
BackpackService is My company project source.I'm sorry.It's not convenient for me to share the detail source. public class BackpackService {
} |
Can you, please, try with #341 fix applied? I discovered another corner case in stackframe map generation and fixed that - might fix also your issue, with some luck. |
Ping. Any chance to test this fix to see whether the problem goes away? |
Unfortunately,I donwload new btrace-bin-1.3.11 release and test.But this bug still here. |
Could you try a custom built BTrace containing commit #527d86f265a0b534791309b42303879aa44da7ae ? |
log here: btrace WARNING: Unknown slot type: -2 btrace WARNING: Unknown slot type: -2 |
Any chance of sharing the compiled version of that class? I can sign whatever non-disclosure agreement if necessary and you can send it directly to my email. |
Hi, I addressed this issue in |
Hello @jbachorik
I use btrace-1.3.11 do some check in my project, and found this Exception.
I found my AOP funtion can not attach on some kind of Class with @location(value=Kind.SYNC_ENTRY).
I don't sure my problem has something to do with this Exception,but I think this Exception is bug.
btrace DEBUG: java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
java.lang.ClassCastException: java.lang.Integer cannot be cast to java.lang.String
at com.sun.btrace.runtime.InstrumentingMethodVisitor.fromSlotType(InstrumentingMethodVisitor.java:1464)
at com.sun.btrace.runtime.InstrumentingMethodVisitor.visitVarInsn(InstrumentingMethodVisitor.java:683)
at com.sun.btrace.org.objectweb.asm.MethodVisitor.visitVarInsn(Unknown Source)
at com.sun.btrace.util.templates.TemplateExpanderVisitor.visitVarInsn(TemplateExpanderVisitor.java:79)
at com.sun.btrace.org.objectweb.asm.MethodVisitor.visitVarInsn(Unknown Source)
at com.sun.btrace.org.objectweb.asm.MethodVisitor.visitVarInsn(Unknown Source)
at com.sun.btrace.org.objectweb.asm.MethodVisitor.visitVarInsn(Unknown Source)
at com.sun.btrace.org.objectweb.asm.ClassReader.a(Unknown Source)
at com.sun.btrace.org.objectweb.asm.ClassReader.b(Unknown Source)
at com.sun.btrace.org.objectweb.asm.ClassReader.accept(Unknown Source)
at com.sun.btrace.runtime.BTraceClassReader.accept(BTraceClassReader.java:174)
at com.sun.btrace.org.objectweb.asm.ClassReader.accept(Unknown Source)
at com.sun.btrace.runtime.BTraceClassReader.accept(BTraceClassReader.java:183)
at com.sun.btrace.runtime.InstrumentUtils.accept(InstrumentUtils.java:177)
at com.sun.btrace.runtime.InstrumentUtils.accept(InstrumentUtils.java:171)
at com.sun.btrace.runtime.BTraceClassWriter.instrument(BTraceClassWriter.java:82)
at com.sun.btrace.runtime.BTraceTransformer.transform(BTraceTransformer.java:184)
at sun.instrument.TransformerManager.transform(TransformerManager.java:188)
at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:428)
at sun.instrument.InstrumentationImpl.retransformClasses0(Native Method)
at sun.instrument.InstrumentationImpl.retransformClasses(InstrumentationImpl.java:144)
at com.sun.btrace.agent.Client.retransformLoaded(Client.java:478)
at com.sun.btrace.agent.Main$3.run(Main.java:692)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
The text was updated successfully, but these errors were encountered: