pop0505 opened a new issue #5070: URL: https://github.com/apache/skywalking/issues/5070
Please answer these questions before submitting your issue. - Why do you submit this issue? - [ ] Question or discussion - [x] Bug - [ ] Requirement - [ ] Feature or performance improvement ___ ### Bug - Which version of SkyWalking, OS and JRE? SkyWalking 6.6, MacOS, JDK8 - What happen? Afer upgrade mongodb-driver version to 4.0.4, I got NullPointerException in my application: ``` java.lang.NullPointerException: null at org.apache.skywalking.apm.agent.core.context.ContextManager.stopSpan(ContextManager.java:182) at org.apache.skywalking.apm.plugin.undertow.v2x.SWRunnable.run(SWRunnable.java:50) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:2019) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1558) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1449) at java.lang.Thread.run(Thread.java:748) ``` And skywalking print error log: ``` ERROR 2020-07-09 16:00:00:146 scheduling-1 InstMethodsInter : class[class com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor] before method[execute] intercept failure java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:936) at org.apache.skywalking.apm.agent.core.dictionary.NetworkAddressDictionary.find(NetworkAddressDictionary.java:44) at org.apache.skywalking.apm.agent.core.context.TracingContext.createExitSpan(TracingContext.java:388) at org.apache.skywalking.apm.agent.core.context.ContextManager.createExitSpan(ContextManager.java:120) at org.apache.skywalking.apm.plugin.mongodb.v3.support.MongoSpanHelper.createExitSpan(MongoSpanHelper.java:39) at org.apache.skywalking.apm.plugin.mongodb.v3.interceptor.v37.MongoDBOperationExecutorInterceptor.beforeMethod(MongoDBOperationExecutorInterceptor.java:51) at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:82) at com.mongodb.client.internal.MongoClientDelegate$DelegateOperationExecutor.execute(MongoClientDelegate.java) at com.mongodb.client.internal.MongoIterableImpl.execute(MongoIterableImpl.java:135) at com.mongodb.client.internal.MongoIterableImpl.iterator(MongoIterableImpl.java:92) at org.springframework.data.mongodb.core.MongoTemplate.executeFindMultiInternal(MongoTemplate.java:2771) at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:2507) at org.springframework.data.mongodb.core.MongoTemplate.doFind(MongoTemplate.java:2489) at org.springframework.data.mongodb.core.MongoTemplate.find(MongoTemplate.java:856) ...... ``` Is it caused by incompatibility with mongodb-driver 4.0+,or other reason? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org