I'm totally alien to Jersey. I'm trying to run a jar which throws javax.ws.rs.WebApplicationException
when I hit the endpoint. The error thrown by the program is as follows:
09-Apr-2011 08:32:20 com.sun.jersey.spi.container.ContainerResponse write
SEVERE: A message body writer for Java class java.lang.String, and Java type class java.lang.String, and MIME media type application/json was not found
09-Apr-2011 08:32:20 com.sun.jersey.spi.container.ContainerResponse write
SEVERE: The registered message body writers compatible with the MIME media type are: / -> com.sun.jersey.server.impl.template.ViewableMessageBodyWriter
09-Apr-2011 08:32:20 com.sun.jersey.spi.container.ContainerResponse logException
Any ideas for where to start looking at for debugging?
Update: I've got javax.ws.rs.ext.MessageBodyWriter
in the META-INF/services
of the jar with the following content: com.sun.jersey.server.impl.template.ViewableMessageBodyWriter
And at the beginning of the program I see: com.sun.jersey.server.impl.application.WebApplicationImpl _initiate