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

NullPointerException in DBTCPConnector

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Critical - P2 Critical - P2
    • 2.4
    • Affects Version/s: 2.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      1 server (1.6.4) / Linux

      After running for some days without problems I just get NullPointerExceptions for every operation.
      I restarted my application (not the server) and the mongo-driver worked again.

      The first error:
      java.lang.NullPointerException: null
      at com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:274) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:205) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:284) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DB.command(DB.java:152) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DB.command(DB.java:141) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DB.getLastError(DB.java:302) ~[mongo-java-driver-2.3.jar:na]

      and afterwards for example:

      Caused by: java.lang.NullPointerException: null
      at com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:274) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:205) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:284) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DB.command(DB.java:152) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DBCollection.getCount(DBCollection.java:642) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DBCollection.getCount(DBCollection.java:616) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DBCursor.count(DBCursor.java:555) ~[mongo-java-driver-2.3.jar:na]

      java.lang.NullPointerException: null
      at com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:274) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:151) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DBTCPConnector.say(DBTCPConnector.java:141) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DBApiLayer$MyCollection.update(DBApiLayer.java:317) ~[mongo-java-driver-2.3.jar:na]
      at com.mongodb.DBCollection.update(DBCollection.java:112) ~[mongo-java-driver-2.3.jar:na]

            Assignee:
            eliot Eliot Horowitz (Inactive)
            Reporter:
            dpeters Daniel Peters
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: