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 srikanthvejendla
, 1 year ago
org.bson.Document cannot be cast to org.bson.conversions.Bson
java.lang.ClassCastException: org.bson.Document cannot be cast to org.bson.conversions.Bson	at com.mongodb.FindIterableImpl.(FindIterableImpl.java:57)	at com.mongodb.MongoCollectionImpl.find(MongoCollectionImpl.java:216)	at com.mongodb.MongoCollectionImpl.find(MongoCollectionImpl.java:211)	at com.relevantcodes.extentreports.reporter.ExtentXReporter.setupProject(ExtentXReporter.java:193)	at com.relevantcodes.extentreports.reporter.ExtentXReporter.start(ExtentXReporter.java:161)	at com.relevantcodes.extentreports.Report.attach(Report.java:38)	at java.util.Spliterators$ArraySpliterator.forEachRemaining(Spliterators.java:948)	at java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:580)	at com.relevantcodes.extentreports.ExtentReports.attachReporter(ExtentReports.java:11)	at com.samsclub.qa.android.tests.SampleTest.firstTest(SampleTest.java:40)