title: MongoDB Java Driver: The type com.mongodb.client.model.InsertOneOptions cannot be resolved. It is indirectly referenced from required .class files
body: <p>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:</p>
  
  <pre><code>The type com.mongodb.client.model.InsertOneOptions cannot be resolved. It is indirectly referenced from required .class files
  </code></pre>
  
  <p>I configured the Java Driver just as this guide said: <a href="https://docs.mongodb.com/getting-started/java/client/" rel="nofollow">https://docs.mongodb.com/getting-started/java/client/</a> </p>
  
  <p>I also tried to create a new project, to no avail.</p>
  
  <p>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).</p>
  
  <p>Thanks in advance.</p>
  
  <p>Edit:
  This is a small piece of code I made for testing the Java Driver:
  <a href="http://pastebin.com/SGj0mXwh" rel="nofollow">http://pastebin.com/SGj0mXwh</a>
  The problem is in the last line of the "addCompletedQuiz" function.</p>
  
  <p>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.</p>
  
  <p>Also, I already tried to redownload and readd the Java Driver to no avail.</p>