Jersey message body reader not found in maven-built JAR

Posted by Olvagor on Stack Overflow See other posts from Stack Overflow or by Olvagor
Published on 2010-04-28T14:57:44Z Indexed on 2010/04/29 9:57 UTC
Read the original article Hit count: 363

My application uses a REST (JAX-RS Jersey) interface. When I run it in Eclipse, everything' s fine. The domain objects are annotated, I'm not using XML files for the REST mapping.

Now I created a standalone JAR using the maven-assembly-plugin, which packs the application and all dependencies in a single, executable JAR file. This also seems to work.

But when I start the application and request an object from the server, Jersey complains, that it can't find a message body reader:

com.sun.jersey.api.client.ClientHandlerException: A message body reader for Java type, class de.rybu.atuin.core.entity.User, and MIME media type, application/json, was not found

Any ideas why this happens?

EDIT: After I slept a night over it, I noticed that it complains about JSON... but I'm using only XML for serialization. Strange.

© Stack Overflow or respective owner

Related posts about java

Related posts about rest