You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to instrument some custom metrics. But I keep running into a java.lang.VerifyError
What I want to achieve: whenever a certain method of a certain class is called, I want to call a getter method of this class and publish the return value (an integer) as metric.
Any ideas, what I am doing wrong?
2023-04-24 14:23:21,335 ERROR 308671 --- [myApp] [pectit-thread-1] r.i.o.c.i.hook.HookManager : Error generating hook for desktopCreated(org.zkoss.zk.ui.Desktop) of myApp.SystemMonitor. Method will not be hooked.
java.lang.VerifyError: Bad return type
Exception Details:
Location:
myApp/inspectitGen$$$72328829221815119.executeImpl([Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Object;Ljava/lang/Throwable;[Ljava/lang/Object;)Ljava/lang/Object; @11: ireturn
Reason:
Type integer (current frame, stack[0]) is not assignable to 'java/lang/Object' (from method signature)
Current Frame:
bci: @11
flags: { }
locals: { '[Ljava/lang/Object;', 'java/lang/Object', 'java/lang/Object', 'java/lang/Throwable', '[Ljava/lang/Object;', 'myApp/SystemMonitor' }
stack: { integer }
Bytecode:
0x0000000: 2bc0 0015 3a05 1905 b600 19ac
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2583)
at java.lang.Class.getField0(Class.java:2975)
at java.lang.Class.getField(Class.java:1701)
at rocks.inspectit.ocelot.core.instrumentation.actions.bound.BoundGenericAction.<init>(BoundGenericAction.java:77)
at rocks.inspectit.ocelot.core.instrumentation.actions.bound.ConstantOnlyBoundGenericAction.<init>(ConstantOnlyBoundGenericAction.java:17)
at rocks.inspectit.ocelot.core.instrumentation.actions.bound.BoundGenericAction.bind(BoundGenericAction.java:63)
at rocks.inspectit.ocelot.core.instrumentation.hook.ActionCallGenerator.generateAndBindGenericAction(ActionCallGenerator.java:46)
at rocks.inspectit.ocelot.core.instrumentation.hook.MethodHookGenerator.buildActionCalls(MethodHookGenerator.java:282)
at rocks.inspectit.ocelot.core.instrumentation.hook.MethodHookGenerator.buildHook(MethodHookGenerator.java:106)
at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.lambda$addOrReplaceHooks$6(HookManager.java:316)
at java.util.HashMap.forEach(HashMap.java:1290)
at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.addOrReplaceHooks(HookManager.java:307)
at rocks.inspectit.ocelot.core.instrumentation.hook.HookManager$HookUpdate.updateHooksForClass(HookManager.java:246)
at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.updateClass(InstrumentationTriggerer.java:261)
at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.getBatchOfClassesToRetransform(InstrumentationTriggerer.java:220)
at rocks.inspectit.ocelot.core.instrumentation.InstrumentationTriggerer.checkClassesForConfigurationUpdates(InstrumentationTriggerer.java:148)
at rocks.inspectit.ocelot.core.service.BatchJobExecutorService.lambda$startJob$0(BatchJobExecutorService.java:126)
at rocks.inspectit.ocelot.core.service.BatchJobExecutorService$BatchJob.lambda$new$0(BatchJobExecutorService.java:83)
at rocks.inspectit.ocelot.core.instrumentation.context.ContextManager.lambda$wrap$1(ContextManager.java:76)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:749)
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello,
I'm trying to instrument some custom metrics. But I keep running into a java.lang.VerifyError
What I want to achieve: whenever a certain method of a certain class is called, I want to call a getter method of this class and publish the return value (an integer) as metric.
Any ideas, what I am doing wrong?
Here is my configuration:
And this is the Error I get:
I would be thankful for some help.
Beta Was this translation helpful? Give feedback.
All reactions