title: Spring MVC - 5.2.9.RELEASE with Mongo (spring-data-mongodb - 3.0.4.RELEASE) not working
body: <p><strong>While configuring the Mongo DB with Spring MVC (5.2.9.RELEASE) and deploying it to Tomcat 9.5 as WAR file it is giving me the follow error:</strong></p>
  <pre><code>Below is the stacktrace:
  Many thanks, I was able to resolve that, but now it is showing me error Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.data.mongodb.core.convert.MappingMongoConverter]: Constructor threw exception; nested exception is java.lang.NoSuchFieldError: DEFAULT with the pom entry:&lt;dependency&gt;
          &lt;groupId&gt;org.mongodb&lt;/groupId&gt;
          &lt;artifactId&gt;mongo-java-driver&lt;/artifactId&gt;
          &lt;version&gt;3.12.7&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;!-- Spring data mongodb --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
          &lt;artifactId&gt;spring-data-mongodb&lt;/artifactId&gt;
          &lt;version&gt;3.0.4.RELEASE&lt;/version&gt;
      &lt;/dependency&gt;
  </code></pre>
  <p>Below is my configuration:</p>
  <pre><code>&lt;beans xmlns=&quot;http://www.springframework.org/schema/beans&quot;
      xmlns:mvc=&quot;http://www.springframework.org/schema/mvc&quot; 
      xmlns:context=&quot;http://www.springframework.org/schema/context&quot;
      xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; 
      xmlns:p=&quot;http://www.springframework.org/schema/p&quot;
      xmlns:tx=&quot;http://www.springframework.org/schema/tx&quot;
      xmlns:mongo=&quot;http://www.springframework.org/schema/data/mongo&quot;
      xsi:schemaLocation=&quot;
          http://www.springframework.org/schema/beans     
          http://www.springframework.org/schema/beans/spring-beans.xsd
          http://www.springframework.org/schema/mvc 
          http://www.springframework.org/schema/mvc/spring-mvc.xsd
          http://www.springframework.org/schema/context 
          http://www.springframework.org/schema/context/spring-context.xsd
          http://www.springframework.org/schema/tx 
          http://www.springframework.org/schema/tx/spring-tx.xsd
          http://www.springframework.org/schema/tx    
          http://www.springframework.org/schema/tx/spring-tx.xsd       
          http://www.springframework.org/schema/data/mongo
          http://www.springframework.org/schema/data/mongo/spring-mongo.xsd&quot;&gt;
  &lt;mongo:mongo-client id=&quot;mongoClient&quot; host=&quot;127.0.0.1&quot; port=&quot;27017&quot; /&gt;
          &lt;mongo:db-factory id=&quot;mongoDbFactory&quot; dbname=&quot;mydocs&quot; mongo-ref=&quot;mongoClient&quot;/&gt;
          &lt;!-- &lt;mongo:db-factory id=&quot;mongoDbFactory&quot; host=&quot;127.0.0.1&quot; port=&quot;27017&quot;  dbname=&quot;mydocs&quot; username=&quot;&quot; password=&quot;&quot;/&gt; --&gt;
          
          
          &lt;mongo:mapping-converter id=&quot;converter&quot; db-factory-ref=&quot;mongoDbFactory&quot;/&gt;
  
      &lt;bean name=&quot;gridFsTemplate&quot;
          class=&quot;org.springframework.data.mongodb.gridfs.GridFsTemplate&quot;&gt;
          &lt;constructor-arg ref=&quot;mongoDbFactory&quot; /&gt;
          &lt;constructor-arg ref=&quot;converter&quot; /&gt;
      &lt;/bean&gt;
  </code></pre>
  <p>And I am using the mongodb dependency as follows:</p>
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;org.mongodb&lt;/groupId&gt;
              &lt;artifactId&gt;mongo-java-driver&lt;/artifactId&gt;
              &lt;version&gt;3.12.7&lt;/version&gt;
          &lt;/dependency&gt;
          
          &lt;!-- Spring data mongodb --&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.data&lt;/groupId&gt;
              &lt;artifactId&gt;spring-data-mongodb&lt;/artifactId&gt;
              &lt;version&gt;3.0.4.RELEASE&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  <p>Please advice how to resolve the issue</p>