I am using Jackson 2.5.4 and the Objectmapper class should be available in com.fasterxml.jackson.databind.ObjectMapper. But for some reason it requires the org.codehaus.jackson.map.Objectmapper class which was used by Jackson 1.x . I am trying to update the jar to from Jackson 1.x to 2.x but I am not able to figure out why it requires the old jar even though I am not using it anymore.
Any help would be highly appreciated. Thanks in advance!
2 things to check:
See if you forgot an import at one of your files. Make sure you import from com.fasterxml
everywhere:
import com.fasterxml.jackson.databind.ObjectMapper;
A full text search for the string "org.codehaus.jackson"
in all *.java
files will help.
Run mvn dependency:tree
or the equivalent in whatever build system you use. That would show you how the dependency to the older Jackson ends up in your jar (eg as transitive dependency)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.