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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by golf1052
, 1 year ago
Size -279948150 is not valid because it is negative.
org.bson.BsonSerializationException: Size -279948150 is not valid because it is negative.
at org.bson.BsonBinaryReader.readSize(BsonBinaryReader.java:360)
at org.bson.BsonBinaryReader.doReadStartDocument(BsonBinaryReader.java:257)
at org.bson.AbstractBsonReader.readStartDocument(AbstractBsonReader.java:422)
at org.bson.AbstractBsonWriter.pipeDocument(AbstractBsonWriter.java:696)
at org.bson.AbstractBsonWriter.pipe(AbstractBsonWriter.java:692)
at org.bson.codecs.RawBsonDocumentCodec.encode(RawBsonDocumentCodec.java:49)
at org.bson.codecs.RawBsonDocumentCodec.encode(RawBsonDocumentCodec.java:37)
at fr.javatic.mongo.jacksonCodec.JacksonCodec.encode(JacksonCodec.java:58)
at com.mongodb.client.model.BuildersHelper.encodeValue(BuildersHelper.java:35)
at com.mongodb.client.model.Filters$SimpleEncodingFilter.toBsonDocument(Filters.java:1019)
at com.mongodb.FindIterableImpl.createQueryOperation(FindIterableImpl.java:172)
at com.mongodb.FindIterableImpl.execute(FindIterableImpl.java:167)
at com.mongodb.FindIterableImpl.first(FindIterableImpl.java:148)
at com.golf1052.time.SaveTest.main(SaveTest.java:35)

Users with the same issue

You are the first who have seen this exception. Write a tip to help other users and build your expert profile.

Know the solutions? Share your knowledge to help other developers to debug faster.