Skip to content

[Bug]NPE in jdk-threadpool-plugin  #12128

@ForrestWang123

Description

@ForrestWang123

Search before asking

  • I had searched in the issues and found no similar issues.

Apache SkyWalking Component

Java Agent (apache/skywalking-java)

What happened

NPE in jdk-threadpool-plugin

java.lang.NullPointerException
at org.apache.skywalking.apm.agent.core.context.ContextManager.activeSpan(ContextManager.java:184)
at org.apache.skywalking.apm.plugin.AbstractThreadingPoolInterceptor.handleMethodException(AbstractThreadingPoolInterceptor.java:66)
at org.apache.skywalking.apm.plugin.ThreadPoolExecuteMethodInterceptor_internal.intercept(InstanceMethodInterWithOverrideArgsTemplate.java:92)
at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java)
at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:112)

What you expected to happen

Should not have NPE

How to reproduce

  1. beforeMethod of AbstractThreadingPoolInterceptor didn't create any span.
  2. exception occur in execution body of the Runnable/Callable

Anything else

No response

Are you willing to submit a pull request to fix on your own?

  • Yes I am willing to submit a pull request on my own!

Code of Conduct

Metadata

Metadata

Labels

bugSomething isn't working and you are sure it's a bug!javaJava agent relatedpluginPlugin for agent or collector. Be used to extend the capabilities of default implementor.

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions