How to resolve "ClassCircularityError" when developing plugin for java/util/concurrent/ThreadPoolExecutor #10207
-
Hello, my friends. When developing a plugin for java/util/concurrent/ThreadPoolExecutor I met "java.lang.ClassCircularityError". Please help me, thanks! 1、this is my ClassEnhancePluginDefine above:
........ 2、when apply my plugin, "ClassCircularityError" occurs when initializing:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 13 replies
-
The simple answer is Because agent kernel service |
Beta Was this translation helpful? Give feedback.
The simple answer is
you can't
.java/util/concurrent/ThreadPoolExecutor
should not be instrumented.Because agent kernel service
ProfileTaskExecutionService
is using this class, this service is required when you call tracing APIs. This is calledClassCircularityError
.B's initialization is relying on A's instrumentation, but A's instrumentation codes are going to using B.
B->A->B
is a cycle.