java.lang.ClassCastException: org.bson.types.Binary cannot be cast to [B

JIRA | alezozov | 6 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.
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.bson.types.Binary cannot be cast to [B

      at com.mongodb.gridfs.GridFSDBFile.getChunk()
    2. MongoDB Java Driver
      GridFSDBFile.writeTo
      1. com.mongodb.gridfs.GridFSDBFile.getChunk(GridFSDBFile.java:89)
      2. com.mongodb.gridfs.GridFSDBFile.writeTo(GridFSDBFile.java:75)
      2 frames