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

NullPointerException at com.mongodb.WriteResult.getN()

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 2.7.3
    • Component/s: None
    • Labels:
      None
    • Environment:
      Linux 64 Bit

      We may get a NPE on calling db.getCollection("offers").update(query, updates, false, true);

      Caused by: java.lang.NullPointerException: no value for: n
      	at org.bson.BasicBSONObject.getInt(BasicBSONObject.java:117) ~[na:na]
      	at com.mongodb.WriteResult.getN(WriteResult.java:127) ~[na:na]
      	...
      

      We see the error from time to time in our logs and don't know yet how to repoduce it.

      While tracing down the issue I found another bug:
      https://jira.mongodb.org/browse/SERVER-6279
      However, I don't know whether they are related or not.

            Assignee:
            jeff.yemin@mongodb.com Jeffrey Yemin
            Reporter:
            kay.agahd@idealo.de Kay Agahd
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: