When I run junit test, encountered this error: java.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException

Solution: add the following dependencies:

 

[html] view plaincopyjava.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingExceptionjava.lang.NoClassDefFoundError: com/fasterxml/jackson/core/JsonProcessingException
 
  1. <dependency>  
  2.             <groupId>com.fasterxml.jackson.core</groupId>  
  3.             <artifactId>jackson-core</artifactId>  
  4.             <version>2.1.0</version>  
  5.         </dependency>  
  6.         <dependency>  
  7.             <groupId>com.fasterxml.jackson.core</groupId>  
  8.             <artifactId>jackson-databind</artifactId>  
  9.             <version>2.1.0</version>  
  10.         </dependency>  
  11.         <dependency>  
  12.             <groupId>com.fasterxml.jackson.core</groupId>  
  13.             <artifactId>jackson-annotations</artifactId>  
  14.             <version>2.1.0</version>  
  15.         </dependency>  

 

Reference:

1. http://stackoverflow.com/questions/14333709/spring-mvc-3-2-and-json-objectmapper-issue

相关文章:

  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-26
  • 2021-12-09
  • 2022-12-23
猜你喜欢
  • 2021-04-22
  • 2022-12-23
  • 2022-12-23
  • 2021-11-10
  • 2022-12-23
  • 2021-06-10
  • 2021-07-26
相关资源
相似解决方案