How to resolve ClassNotFoundException: com.mongodb.connection.BufferProvider?

On the mongo driver page here: http://mongodb.github.io/mongo-java-driver/3.0/driver/getting-started/installation-guide/#mongodb-driver

You'll see the following text:

Note: mongodb-driver requires the following dependencies: bson and mongodb-driver-core

So you need all of the following jars to make this work:

mongodb-driver-3.0.1.jar, mongodb-driver-core-3.0.1.jar, bson-3.0.1.jar

Which can be downloaded from here: https://oss.sonatype.org/content/repositories/releases/org/mongodb/mongodb-driver/3.0.1/ https://oss.sonatype.org/content/repositories/releases/org/mongodb/mongodb-driver-core/3.0.1/ https://oss.sonatype.org/content/repositories/releases/org/mongodb/bson/3.0.1/


The following java driver contains the BufferProvider class:

http://mvnrepository.com/artifact/org.mongodb/mongo-java-driver/3.0.0

Tags:

Java

Mongodb