I am using Spring + Jersey to build an API service .
Recently , I try to incorporate Spring Data to my server .
I haven't truly use any Repositories in my running code , just add one line in my app.xml :
But ! I notice my API not working , complaining "A message body writer for Java class xxx , and Java type class xxx , and MIME media type application/json was not found"
If I remove the "jpa:repositories ..." line in my xml , everything works fine !
and , all provider classes are registered by spring :
{http://*:8080-1} Registering Spring bean, apiResultJsonWriter, of type destiny.web.api.ApiResultJsonWriter as a provider class
{http://*:8080-1} Registering Spring bean, webApi, of type destiny.web.api.WebApi as a root resource class
{http://*:8080-1} Initiating Jersey application, version 'Jersey: 1.8 06/24/2011 12:17 PM'
But , if I add "jpa:repositories..." line in my XML , only "root resources class" are registered :
{http://*:8080-1} CDI support is enabled
{http://*:8080-1} Using default applicationContext
{http://*:8080-1} Registering Spring bean, webApi, of type destiny.web.api.WebApi as a root resource class
{http://*:8080-1} Initiating Jersey application, version 'Jersey: 1.8 06/24/2011 12:17 PM'
I don't know if it is Spring-Data's bug ?
And how to solve it ?
environment :
spring-3.1
jersey-core-1.8.jar
jersey-server-1.8.jar
jersey-spring-1.8.jar
spring-data-jpa-1.0.3.RELEASE.jar
spring-data-commons-core-1.1.0.RELEASE.jar
server : resin-4.0.25
smallufo opened DATAJPA-172 and commented
I am using Spring + Jersey to build an API service .
Recently , I try to incorporate Spring Data to my server .
I haven't truly use any Repositories in my running code , just add one line in my app.xml :
But ! I notice my API not working , complaining "A message body writer for Java class xxx , and Java type class xxx , and MIME media type application/json was not found"
If I remove the "jpa:repositories ..." line in my xml , everything works fine !
and , all provider classes are registered by spring :
But , if I add "jpa:repositories..." line in my XML , only "root resources class" are registered :
I don't know if it is Spring-Data's bug ?
And how to solve it ?
environment :
Related dependencies :
Affects: 1.0.3
Reference URL: http://forum.springsource.org/showthread.php?123119-Spring-Data-makes-spring-unable-to-find-JAXRS-s-Provider&p=401568
The text was updated successfully, but these errors were encountered: