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.