I've tried to implement Robospice into my application according the Robospice's Starter Guide. I'm getting the following errors:
09-11 20:28:32.290: E/AndroidRuntime(25480): FATAL EXCEPTION: main
09-11 20:28:32.290: E/AndroidRuntime(25480): java.lang.NoClassDefFoundError: org.codehaus.jackson.map.ObjectMapper
09-11 20:28:32.290: E/AndroidRuntime(25480): at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.(MappingJacksonHttpMessageConverter.java:54)
09-11 20:28:32.290: E/AndroidRuntime(25480): at com.my.app.io.service.JsonSpiceService.createRestTemplate(JsonSpiceService.java:37)
Here is what I've tried so far:
libs folder): jackson-annotations-2.2.2.jar, jackson-core-2.2.2.jar, jackson-databind-2.2.2.jar (among all the other Robospice-related jars but Jackson is the one causing problems). I've also tested it with 2.2.3 (same problem)What else could cause this problem?
You are referencing org.codehaus.jackson.map.ObjectMapper when you should be referencing com.fasterxml.jackson.databind.ObjectMapper which is in jackson-databind.
This is probably because MappingJacksonHttpMessageConverter uses the old version, which is in jackson-mapper-asl-1.9.xx. You can get those here.
Otherwise, use MappingJackson2HttpMessageConverter (note the 2) which correctly uses the newest version of jackson.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With