org.bson.BSONException: Unexpected BSON type: DECIMAL128

JIRA | Chunming Li | 3 months ago
  1. 0

    (Copied from stack exchange on suggestion. http://stackoverflow.com/q/28950708/1920149 ) I get the exception below, when from code I try to cursor.next() and the document response should be: { "_id" : ObjectId("54fcc2b5664347b9be743599"), "content" : "hvězdnější", "languages" : { "cs" : { "lemma" : "hvězdnější" } } } This is the exception. WARNING: emptying DBPortPool to localhost/127.0.0.1:27017 b/c of error org.bson.BSONException: bad string size: 1701707776 at org.bson.BasicBSONDecoder$BSONInput.readUTF8String(BasicBSONDecoder.java:447) at org.bson.BasicBSONDecoder.decodeElement(BasicBSONDecoder.java:155) at org.bson.BasicBSONDecoder.decodeElement(BasicBSONDecoder.java:196) at org.bson.BasicBSONDecoder._decode(BasicBSONDecoder.java:79) at org.bson.BasicBSONDecoder.decode(BasicBSONDecoder.java:57) at com.mongodb.DefaultDBDecoder.decode(DefaultDBDecoder.java:61) at com.mongodb.Response.<init>(Response.java:83) at com.mongodb.DBPort.go(DBPort.java:142) at com.mongodb.DBPort.call(DBPort.java:92) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:244) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273) at com.mongodb.DBCursor._check(DBCursor.java:368) at com.mongodb.DBCursor._next(DBCursor.java:419) at com.mongodb.DBCursor.next(DBCursor.java:494) What can be done with this? when I try to fetch the same document with RoboMongo it is received correctly. Note: Cursor did not fail with hundreds of thounds of documents, but I presume the problem with this one is in the word hvězdnější, because of its UTF-8 characters (UTF-8 also figures in stack trace)

    JIRA | 2 years ago | Šimon Demočko
    org.bson.BSONException: bad string size: 1701707776
  2. 0

    Mongo cursor.next() -> org.bson.BSONException: bad string size upon fetching "hvězdnější"

    Stack Overflow | 2 years ago
    org.bson.BSONException: bad string size: 1701707776
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Illegal State exception mongo-hadoop and spark

    Stack Overflow | 2 years ago | HDJ
    org.bson.BSONException: should be impossible
  5. 0

    (Copied from stack exchange on suggestion. http://stackoverflow.com/q/28950708/1920149 ) I get the exception below, when from code I try to cursor.next() and the document response should be: { "_id" : ObjectId("54fcc2b5664347b9be743599"), "content" : "hvězdnější", "languages" : { "cs" : { "lemma" : "hvězdnější" } } } This is the exception. WARNING: emptying DBPortPool to localhost/127.0.0.1:27017 b/c of error org.bson.BSONException: bad string size: 1701707776 at org.bson.BasicBSONDecoder$BSONInput.readUTF8String(BasicBSONDecoder.java:447) at org.bson.BasicBSONDecoder.decodeElement(BasicBSONDecoder.java:155) at org.bson.BasicBSONDecoder.decodeElement(BasicBSONDecoder.java:196) at org.bson.BasicBSONDecoder._decode(BasicBSONDecoder.java:79) at org.bson.BasicBSONDecoder.decode(BasicBSONDecoder.java:57) at com.mongodb.DefaultDBDecoder.decode(DefaultDBDecoder.java:61) at com.mongodb.Response.<init>(Response.java:83) at com.mongodb.DBPort.go(DBPort.java:142) at com.mongodb.DBPort.call(DBPort.java:92) at com.mongodb.DBTCPConnector.innerCall(DBTCPConnector.java:244) at com.mongodb.DBTCPConnector.call(DBTCPConnector.java:216) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:288) at com.mongodb.DBApiLayer$MyCollection.__find(DBApiLayer.java:273) at com.mongodb.DBCursor._check(DBCursor.java:368) at com.mongodb.DBCursor._next(DBCursor.java:419) at com.mongodb.DBCursor.next(DBCursor.java:494) What can be done with this? when I try to fetch the same document with RoboMongo it is received correctly. Note: Cursor did not fail with hundreds of thounds of documents, but I presume the problem with this one is in the word hvězdnější, because of its UTF-8 characters (UTF-8 also figures in stack trace)

    JIRA | 2 years ago | Šimon Demočko
    org.bson.BSONException: bad string size: 1701707776

    Root Cause Analysis

    1. org.bson.BSONException

      Unexpected BSON type: DECIMAL128

      at org.bson.BsonBinaryReader.doSkipValue()
    2. MongoDB Java Driver
      LazyDBDecoder.readObject
      1. org.bson.BsonBinaryReader.doSkipValue(BsonBinaryReader.java:357)[mongo-java-driver-3.4.0-SNAPSHOT.jar:na]
      2. org.bson.AbstractBsonReader.skipValue(AbstractBsonReader.java:492)[mongo-java-driver-3.4.0-SNAPSHOT.jar:na]
      3. org.bson.LazyBSONObject.keySet(LazyBSONObject.java:151)[mongo-java-driver-3.4.0-SNAPSHOT.jar:na]
      4. com.mongodb.LazyDBCallback.createObject(LazyDBCallback.java:41)[mongo-java-driver-3.4.0-SNAPSHOT.jar:na]
      5. org.bson.LazyBSONCallback.gotBinary(LazyBSONCallback.java:41)[mongo-java-driver-3.4.0-SNAPSHOT.jar:na]
      6. org.bson.LazyBSONDecoder.decode(LazyBSONDecoder.java:63)[mongo-java-driver-3.4.0-SNAPSHOT.jar:na]
      7. com.mongodb.LazyDBDecoder.readObject(LazyDBDecoder.java:39)[mongo-java-driver-3.4.0-SNAPSHOT.jar:na]
      7 frames