java.lang.ClassCastException: org.bson.BasicBSONObject cannot be cast to com.mongodb.DBObject

JIRA | Artem Yankov | 5 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.

    Root Cause Analysis

    1. java.lang.ClassCastException

      org.bson.BasicBSONObject cannot be cast to com.mongodb.DBObject

      at com.mongodb.hadoop.input.MongoInputSplit.readFields()
    2. com.mongodb.hadoop
      MongoInputSplit.readFields
      1. com.mongodb.hadoop.input.MongoInputSplit.readFields(MongoInputSplit.java:122)
      1 frame
    3. Hadoop
      WritableSerialization$WritableDeserializer.deserialize
      1. org.apache.hadoop.io.serializer.WritableSerialization$WritableDeserializer.deserialize(WritableSerialization.java:67)
      2. org.apache.hadoop.io.serializer.WritableSerialization$WritableDeserializer.deserialize(WritableSerialization.java:40)
      2 frames
    4. Hadoop
      Child$4.run
      1. org.apache.hadoop.mapred.MapTask.getSplitDetails(MapTask.java:395)
      2. org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:727)
      3. org.apache.hadoop.mapred.MapTask.run(MapTask.java:369)
      4. org.apache.hadoop.mapred.Child$4.run(Child.java:259)
      4 frames
    5. Java RT
      Subject.doAs
      1. java.security.AccessController.doPrivileged(Native Method)
      2. javax.security.auth.Subject.doAs(Subject.java:396)
      2 frames
    6. Hadoop
      UserGroupInformation.doAs
      1. org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059)
      1 frame
    7. Hadoop
      Child.main
      1. org.apache.hadoop.mapred.Child.main(Child.java:253)
      1 frame