I'm using MongoDB for a small project, but I'm getting this error when trying to use the function insertOne(Document) in the MongoDB Java Driver:
The type com.mongodb.client.model.InsertOneOptions cannot be resolved. It is indirectly referenced from required .class files
I configured the Java Driver just as this guide said: https://docs.mongodb.com/getting-started/java/client/
I also tried to create a new project, to no avail.
The MongoDB version I'm using is 3.2.6, and the MongoDB Java Driver version I'm using is 3.2.2. My JDK version is 1.8.0_91. The IDE I'm using is Eclipse Mars 2 (I don't know if that matters).
Thanks in advance.
Edit: This is a small piece of code I made for testing the Java Driver: http://pastebin.com/SGj0mXwh The problem is in the last line of the "addCompletedQuiz" function.
The only libraries I added to the project are the BSON 3.0.4 library and the MongoDB Java Driver 3.2.2 library, so I don't think this is a "JAR Hell" problem.
Also, I already tried to redownload and readd the Java Driver to no avail.