If you use Jackson 2, then you need to use a Jackson2SpringAndroidSpiceService
and not a JacksonSpringAndroidSpiceService
. The 2 matters :)
Using RoboSpice with Jackson2 and Spring
Вопрос
I want to use Jackson2 with SpringRoboSpice
.
my libs folder contains the following jars .
- commons-io-1.3.2.jar
- commons-lang3-3.2.1.jar
- jackson-annotations-2.2.3.jar
- jackson-core-2.2.3.jar
- jackson-databind-2.2.3.jar
- robospice-1.4.11.jar
- robospice-cache-1.4.11.jar
- robospice-spring-android-1.4.11.jar
- spring-android-core-1.0.1.RELEASE.jar
- spring-android-rest-template-1.0.1.RELEASE.jar
as written here SpringAndroidSpiceService
will switch to jackson2
if jackson2 jars found.
the app crash with this exception:
java.lang.NoClassDefFoundError: org.codehaus.jackson.map.ObjectMapper
at org.springframework.http.converter.json.MappingJacksonHttpMessageConverter.<init>(MappingJacksonHttpMessageConverter.java:54)
at com.octo.android.robospice.JacksonSpringAndroidSpiceService.createRestTemplate(JacksonSpringAndroidSpiceService.java:33)
at com.octo.android.robospice.SpringAndroidSpiceService.onCreate(SpringAndroidSpiceService.java:26)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:2572)
at android.app.ActivityThread.access$1800(ActivityThread.java:135)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1278)
What i am missing?
Решение
Не связан с StackOverflow