I migrated my Spring framework from 3.x to 4.2.RELEASE, but when I run jUnit I get this error:
Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Unexpected exception parsing XML document from URL [file:src/test/resources/applicationContext.xml]; nested exception is java.lang.NoClassDefFoundError: org/springframework/http/converter/json/MappingJacksonHttpMessageConverter
I have been reading online since version 4.1. it is no longer supported; I checked and the new version is available along the application class path (I imported the spring -web dependency). ( Spring 4 and Rest WS integration )
It seems that Spring is still looking for an old version of the converter. It probably depends on what I have in the context of my application, but the question is, how can I "tell Spring" to use the new version?
- UPDATE
I commented
<mvc:annotation-driven />
and it seems to work just fine, but ... why?