A message body writer for Java class not found

I finally found my answer. I added

<dependency>
    <groupId>com.sun.jersey</groupId>
    <artifactId>jersey-json</artifactId>
    <version>1.8</version>
</dependency>

to my pom.xml file. Then I added

<init-param>
    <param-name>com.sun.jersey.api.json.POJOMappingFeature</param-name>
    <param-value>true</param-value>
</init-param>

to my web.xml file, and everything works fine. No change was required to my code above.

Leave a Comment

tech