org.bson.BsonSerializationException: Size -279948150 is not valid because it is negative.

GitHub | golf1052 | 9 months ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    GitHub comment 10#232997767

    GitHub | 9 months ago | golf1052
    org.bson.BsonSerializationException: Size -279948150 is not valid because it is negative.
  2. 0

    Find using Java 8 time on collection fails with BsonSerializationExecption

    GitHub | 10 months ago | golf1052
    org.bson.BsonSerializationException: Detected unknown BSON type "\x55" for fieldname "". Are you using the latest driver version?

    Root Cause Analysis

    1. org.bson.BsonSerializationException

      Size -279948150 is not valid because it is negative.

      at org.bson.BsonBinaryReader.readSize()
    2. MongoDB Java Driver
      RawBsonDocumentCodec.encode
      1. org.bson.BsonBinaryReader.readSize(BsonBinaryReader.java:360)
      2. org.bson.BsonBinaryReader.doReadStartDocument(BsonBinaryReader.java:257)
      3. org.bson.AbstractBsonReader.readStartDocument(AbstractBsonReader.java:422)
      4. org.bson.AbstractBsonWriter.pipeDocument(AbstractBsonWriter.java:696)
      5. org.bson.AbstractBsonWriter.pipe(AbstractBsonWriter.java:692)
      6. org.bson.codecs.RawBsonDocumentCodec.encode(RawBsonDocumentCodec.java:49)
      7. org.bson.codecs.RawBsonDocumentCodec.encode(RawBsonDocumentCodec.java:37)
      7 frames
    3. fr.javatic.mongo
      JacksonCodec.encode
      1. fr.javatic.mongo.jacksonCodec.JacksonCodec.encode(JacksonCodec.java:58)
      1 frame
    4. MongoDB Java Driver
      FindIterableImpl.first
      1. com.mongodb.client.model.BuildersHelper.encodeValue(BuildersHelper.java:35)
      2. com.mongodb.client.model.Filters$SimpleEncodingFilter.toBsonDocument(Filters.java:1019)
      3. com.mongodb.FindIterableImpl.createQueryOperation(FindIterableImpl.java:172)
      4. com.mongodb.FindIterableImpl.execute(FindIterableImpl.java:167)
      5. com.mongodb.FindIterableImpl.first(FindIterableImpl.java:148)
      5 frames
    5. com.golf1052.time
      SaveTest.main
      1. com.golf1052.time.SaveTest.main(SaveTest.java:35)
      1 frame