Factory method ‘mongoDbFactory’ threw exception; nested exception is java.lang.IllegalAccessError: tried to access method org.bson.types.ObjectId.(III)V from class com.mongodb.Bytes at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:599)
Hi Pradeep,
It’s been a while since you posted the question, have you found a solution to it yet ?
Based on your exception log output, looks like there is a compatibility issue between com.mongodb.Bytes and org.springframework.beans.factory for mongoDbFactory
.
I would suggest to post a question on Spring at StackOverflow to reach wider audience regarding the java spring compatibility version .
Kind regards,
Wan