org.bson.BsonSerializationException: Expected length to be 16, not 24.

JIRA | Ross Lawley | 2 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.

    Root Cause Analysis

    1. org.bson.BsonSerializationException

      Expected length to be 16, not 24.

      at org.bson.codecs.UuidCodec.decode()
    2. MongoDB Java Driver
      Document.parse
      1. org.bson.codecs.UuidCodec.decode(UuidCodec.java:100)
      2. org.bson.codecs.UuidCodec.decode(UuidCodec.java:36)
      3. org.bson.codecs.DocumentCodec.readValue(DocumentCodec.java:212)
      4. org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:141)
      5. org.bson.codecs.DocumentCodec.decode(DocumentCodec.java:45)
      6. org.bson.Document.parse(Document.java:105)
      7. org.bson.Document.parse(Document.java:90)
      7 frames