Skip to content

How to resolve "ClassCircularityError" when developing plugin for java/util/concurrent/ThreadPoolExecutor #10207

Answered by wu-sheng
william-peng-cn asked this question in Q&A
Discussion options

You must be logged in to vote

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 called ClassCircularityError.
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.

Replies: 1 comment 13 replies

Comment options

You must be logged in to vote
13 replies
@hxd123456
Comment options

@wu-sheng
Comment options

@zimu312500
Comment options

@bert82503
Comment options

@bert82503
Comment options

Answer selected by wu-sheng
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
8 participants