ObjectMapper java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
<p>I am trying to map a Json string to a Java Object using ObjectMapper</p>

<pre><code>ObjectMapper mapper = new ObjectMapper();
CustomerData customerData = mapper.readValue(customerDataString, customerData.class);
</code></pre>

<p>But when I do, I get this error</p>

<pre><code>java.lang.NoSuchMethodError: com.fasterxml.jackson.core.JsonFactory.requiresPropertyOrdering()Z
    at com.fasterxml.jackson.databind.ObjectMapper.&lt;init&gt;(ObjectMapper.java:530)
</code></pre>

<p>I looked online and checked for the incompatible dependencies in the pom.xml, and it appears to be the right version. So what am I missing?</p>

<pre><code>    &lt;dependency&gt;
        &lt;groupId&gt;com.fasterxml.jackson.core&lt;/groupId&gt;
        &lt;artifactId&gt;jackson-databind&lt;/artifactId&gt;
        &lt;version&gt;2.6.0&lt;/version&gt;
    &lt;/dependency&gt;
</code></pre>