My application uses the REST interface (JAX-RS). When I run it in Eclipse, ok. Domain objects are annotated; I do not use XML files to display REST.
Now I created a stand-alone JAR using the maven-assembly-plugin module, which packs the application and all the dependencies into a single executable JAR file. This also works.
But when I launch the application and request the object from the server, Jersey complains that he cannot find the reader of the message body:
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 is happening?
EDIT: After I slept through the night, I noticed that he complains about JSON ... but I use only XML for serialization. It’s strange.
source
share