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

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

java.lang.ClassCastException: org.bson.BasicBSONObject cannot be cast to com.mongodb.DBObject
at com.mongodb.hadoop.input.MongoInputSplit.readFields(MongoInputSplit.java:122)
at org.apache.hadoop.io.serializer.WritableSerialization$WritableDeserializer.deserialize(WritableSerialization.java:67)
at org.apache.hadoop.mapred.MapTask.getSplitDetails(MapTask.java:395)
at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:727)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:369)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:396)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1059)

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.