Uploaded image for project: 'Java Driver'
  1. Java Driver
  2. JAVA-2445

NullPointerException in AsyncQueryBatchCursor

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.5.0
    • Affects Version/s: 3.4.2
    • Component/s: Async
    • None
    • Environment:
      CloudFoundry, ElasticRuntime

      The stacktrace shown below happens on client side after switching to MongoDB 3.4 (server side). After the exception, MongoDB access is stalled in our application. Shortly before the exception occured the following log entry is output:

      Asynchronously sending command {getMore : BsonInt64{value=7176533098879}} to database db-dec6a4ff-3ecc-4fcd-bece-aeeccdcb101c on connection [connectionId{localValue:301, serverValue:488234}] to server mdb001uans1.clouduser.bicadmin.com:30000
      
      Callback onResult call produced an error java.lang.NullPointerException
      at com.mongodb.operation.AsyncQueryBatchCursor$CommandResultSingleResultCallback.onResult(AsyncQueryBatchCursor.java:255) ~[mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.operation.AsyncQueryBatchCursor$CommandResultSingleResultCallback.onResult(AsyncQueryBatchCursor.java:235) ~[mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.DefaultServer$DefaultServerProtocolExecutor$1.onResult(DefaultServer.java:185) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.CommandProtocol$CommandResultCallback.callCallback(CommandProtocol.java:271) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.ResponseCallback.onResult(ResponseCallback.java:48) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.ResponseCallback.onResult(ResponseCallback.java:23) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.DefaultConnectionPool$PooledConnection$2.onResult(DefaultConnectionPool.java:470) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.DefaultConnectionPool$PooledConnection$2.onResult(DefaultConnectionPool.java:464) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.UsageTrackingInternalConnection$3.onResult(UsageTrackingInternalConnection.java:119) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.UsageTrackingInternalConnection$3.onResult(UsageTrackingInternalConnection.java:115) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection.executeCallbackAndReceiveResponse(InternalStreamConnection.java:378) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection.access$1700(InternalStreamConnection.java:66) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection$ResponseBuffersCallback.onResult(InternalStreamConnection.java:420) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection$ResponseBuffersCallback.onResult(InternalStreamConnection.java:389) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.onSuccess(InternalStreamConnection.java:562) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.access$2200(InternalStreamConnection.java:517) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback$ResponseBodyCallback.onResult(InternalStreamConnection.java:584) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback$ResponseBodyCallback.onResult(InternalStreamConnection.java:568) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection$3.completed(InternalStreamConnection.java:447) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection$3.completed(InternalStreamConnection.java:444) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:218) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:201) [mongodb-driver-core-3.4.2.jar!/:?]
      at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) [?:1.8.0_112]
      at sun.nio.ch.Invoker.invokeDirect(Invoker.java:157) [?:1.8.0_112]
      at sun.nio.ch.UnixAsynchronousSocketChannelImpl.implRead(UnixAsynchronousSocketChannelImpl.java:553) [?:1.8.0_112]
      at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:276) [?:1.8.0_112]
      at sun.nio.ch.AsynchronousSocketChannelImpl.read(AsynchronousSocketChannelImpl.java:297) [?:1.8.0_112]
      at com.mongodb.connection.AsynchronousSocketChannelStream.readAsync(AsynchronousSocketChannelStream.java:125) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection.readAsync(InternalStreamConnection.java:444) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection.access$2000(InternalStreamConnection.java:66) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.onResult(InternalStreamConnection.java:541) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection$ResponseHeaderCallback.onResult(InternalStreamConnection.java:517) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.internal.async.ErrorHandlingResultCallback.onResult(ErrorHandlingResultCallback.java:49) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection$3.completed(InternalStreamConnection.java:447) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.InternalStreamConnection$3.completed(InternalStreamConnection.java:444) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:218) [mongodb-driver-core-3.4.2.jar!/:?]
      at com.mongodb.connection.AsynchronousSocketChannelStream$BasicCompletionHandler.completed(AsynchronousSocketChannelStream.java:201) [mongodb-driver-core-3.4.2.jar!/:?]
      at sun.nio.ch.Invoker.invokeUnchecked(Invoker.java:126) [?:1.8.0_112]
      at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finishRead(UnixAsynchronousSocketChannelImpl.java:430) [?:1.8.0_112]
      at sun.nio.ch.UnixAsynchronousSocketChannelImpl.finish(UnixAsynchronousSocketChannelImpl.java:191) [?:1.8.0_112]
      at sun.nio.ch.UnixAsynchronousSocketChannelImpl.onEvent(UnixAsynchronousSocketChannelImpl.java:213) [?:1.8.0_112]
      at sun.nio.ch.EPollPort$EventHandlerTask.run(EPollPort.java:293) [?:1.8.0_112]
      at sun.nio.ch.AsynchronousChannelGroupImpl$1.run(AsynchronousChannelGroupImpl.java:112) [?:1.8.0_112]
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_112]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_112]
      at java.lang.Thread.run(Thread.java:745) [?:1.8.0_112]

            Assignee:
            ross@mongodb.com Ross Lawley
            Reporter:
            swachter Stefan Wachter
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: