When I run junit test, encountered this error: java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException
Solution: add the following dependencies:
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.1.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.1.0</version>
</dependency>
Reference:
1. http://stackoverflow.com/questions/14333709/spring-mvc-3-2-and-json-objectmapper-issue