Bharaniga M
Bharaniga M

Reputation: 1

i am using jsp and mongodb for my project using jar files to connect mongodb and java

I am using jsp and mongodb for my project and following libraries to connect java and mongodb I already tried this libraries its working

bson-3.0.2 jar.
mongodb-driver-3.0.2 jar.
mongodb-driver-core-3.0.2 jar.
mongodb-java-driver-3.2.0-javadoc jar.

its running but today i add mongodb-java-driver-2.10.1.jar after that I have following error

java.lang.IllegalAccessError: tried to access method
    org.bson.types.ObjectId.<init>(III)V from class com.mongodb.Bytes

plz help to correct the error

Upvotes: 0

Views: 69

Answers (1)

Daisy Li
Daisy Li

Reputation: 54

Because the mongodb-java-driver that you added is too old? Why do you use the old driver with its newer dependencies? Because there's some method you need in this older pack?

Upvotes: 2

Related Questions