Jackson ObjectMapper() constructor throws NoSuchMethod

后端 未结 9 1851
忘掉有多难
忘掉有多难 2020-12-09 03:40

I\'m using Jackson sample code to deserialize a POJO:

ObjectMapper m = new ObjectMapper();

This line throws a NoSuchMethodError:

         


        
9条回答
  •  盖世英雄少女心
    2020-12-09 04:10

    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.

            
                
                    org.codehaus.jackson
                    jackson-mapper-asl
                
            
    

提交回复
热议问题