I\'m using Jackson sample code to deserialize a POJO:
ObjectMapper m = new ObjectMapper();
This line throws a NoSuchMethodError:
The trick here is to exclude jackson from the dependencies that use it.
To check which dependencies import it, you can use the following maven command:
mvn dependency:tree -Dincludes=org.codehaus.jackson
In my case it was due to yammer-metrics library including an older version of jackson.
<dependency>
<groupId>com.yammer.metrics</groupId>
<artifactId>metrics-servlet</artifactId>
<version>2.1.2</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</exclusion>
</exclusions>
</dependency>
I had this same problem. The core jar was 1.7.1 while the mapper was 1.8.1. Note: To fix this for maven I added an exclusion and pulled down the proper version.
<exclusions>
<exclusion>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
</exclusion>
</exclusions>