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

java driver exception on dbcursor hasnext

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Works as Designed
    • Affects Version/s: 1.4
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:
      linux ubuntu
    • # Replies:
      3
    • Last comment by Customer:
      false

      Description

      I'm using morphia for object mappings.
      I have no problem inserting objects to database or pulling them via
      the shell.
      When using the java driver both 1.4 and 2.0rc
      For some objects i get the following exception:
      Exception in thread "main" com.mongodb.MongoInternalException:
      couldn't get next element
      at com.mongodb.DBCursor.hasNext(DBCursor.java:402)
      at
      knil.attributeGraphIndexer.postAnalytics.MongoTest.run2(MongoTest.java:
      90)
      at
      knil.attributeGraphIndexer.postAnalytics.MongoTest.main(MongoTest.java:
      100)
      Caused by: com.mongodb.MongoException: invalid bson? size:134217743
      remaining: 8077
      at com.mongodb.ByteDecoder.decodeNext(ByteDecoder.java:191)
      at com.mongodb.ByteDecoder.decodeNext(ByteDecoder.java:254)
      at com.mongodb.ByteDecoder.decodeNext(ByteDecoder.java:235)
      at com.mongodb.ByteDecoder.readObject(ByteDecoder.java:104)
      at com.mongodb.DBApiLayer$SingleResult.<init>(DBApiLayer.java:407)
      at com.mongodb.DBApiLayer$MyCollection.find(DBApiLayer.java:299)
      at com.mongodb.DBCursor._check(DBCursor.java:253)
      at com.mongodb.DBCursor._hasNext(DBCursor.java:374)
      at com.mongodb.DBCursor.hasNext(DBCursor.java:399)
      ... 2 more

      attached is a db with the object

      any ideas what is wrong?

        Attachments

          Activity

            People

            • Assignee:
              eliot Eliot Horowitz
              Reporter:
              sirpy hadar
              Participants:
              Last commenter:
              Rathi Gnanasekaran
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since reply:
                7 years, 20 weeks ago
                Date of 1st Reply: