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

Unexpected java.lang.NullPointerException at DBCursor.hasNext()

    • Type: Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Priority: Icon: Critical - P2 Critical - P2
    • None
    • Affects Version/s: 2.6.5
    • Component/s: API
    • Labels:
      None
    • Environment:
      Debian 5 Lenny 32bit
      MongoDB 2.0.0
      java version "1.6.0_26"
      Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
      Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode)

      java.lang.NullPointerException
              at sun.nio.ch.Util$BufferCache.get(Util.java:74)
              at sun.nio.ch.Util.getTemporaryDirectBuffer(Util.java:144)
              at sun.nio.ch.IOUtil.read(IOUtil.java:174)
              at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:243)
              at sun.nio.ch.SocketAdaptor$SocketInputStream.read(SocketAdaptor.java:176)
              at sun.nio.ch.ChannelInputStream.read(ChannelInputStream.java:86)
              at com.mongodb.DBPort._read(DBPort.java:219)
              at com.mongodb.DBPort.go(DBPort.java:91)
              at com.mongodb.DBPort.call(DBPort.java:58)  
              at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:158)
              at com.mongodb.DBApiLayer$MyCollection.find(DBApiLayer.java:297)
              at com.mongodb.DBCursor._check(DBCursor.java:253)
              at com.mongodb.DBCursor._hasNext(DBCursor.java:374)
              at com.mongodb.DBCursor.hasNext(DBCursor.java:399)
      

      This happened 12 times this morning. And once a couple of days before. Any thoughts what it could be? Can it be because of some incompartibilities between driver and DB versions?

      If you assist I can turn on some additional logging to be able to help to catch the problem.

            Assignee:
            antoine Antoine Girbal
            Reporter:
            smeagol Konstantin V. Borisov
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: