java.lang.NullPointerException: null

JIRA | Daniel Peters | 6 years ago
  1. 0

    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]

    JIRA | 6 years ago | Daniel Peters
    java.lang.NullPointerException: null
  2. 0
    samebug tip
    Elasticsearch 1.x and 2.x nodes are not compatible, make sure your setup contains nodes of the same major version.
    via GitHub by dakrone
  3. 0
    samebug tip
    It is a JDK bug, no workaround currently.
    via GitHub by jroper
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0
    samebug tip
    Some of the parametes ar enull
  6. 0
    samebug tip
    Try looking for variables that have been declared but not created as an object on the functions described in the stack trace.

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      null

      at com.mongodb.DBTCPConnector$MyPort.get()
    2. MongoDB Java Driver
      DB.getLastError
      1. com.mongodb.DBTCPConnector$MyPort.get(DBTCPConnector.java:274)[mongo-java-driver-2.3.jar:na]
      2. com.mongodb.DBTCPConnector.call(DBTCPConnector.java:205)[mongo-java-driver-2.3.jar:na]
      3. com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:284)[mongo-java-driver-2.3.jar:na]
      4. com.mongodb.DB.command(DB.java:152)[mongo-java-driver-2.3.jar:na]
      5. com.mongodb.DB.command(DB.java:141)[mongo-java-driver-2.3.jar:na]
      6. com.mongodb.DB.getLastError(DB.java:302)[mongo-java-driver-2.3.jar:na]
      6 frames