users@jersey.java.net

[Jersey] Problem with Jersey and Glassfish 3.1.2 - A message body writer for Java class java.util.ArrayList not found

From: sreeram duvur <sduvur_at_gmail.com>
Date: Thu, 8 Aug 2013 08:47:49 -0700

I am trying to find a solution for this runtime exception:

[#|2013-08-08T08:39:40.698-0700|SEVERE|glassfish3.1.2|com.sun.jersey.spi.container.ContainerResponse|_ThreadID=563;_ThreadName=Thread-2;|Mapped
exception to response: 500 (Internal Server Error)
javax.ws.rs.WebApplicationException: com.sun.jersey.api.MessageException: A
message body writer for Java class java.util.ArrayList, and Java type class
java.util.ArrayList, and MIME media type application/json was not found
        at
com.sun.jersey.spi.container.ContainerResponse.write(ContainerResponse.java:285)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1437)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1349)
        at
com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1339)
        at
com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:537)
        at
com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:708)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:770)


This is what I have in the WEB-INF/lib

./domains/domain1/applications/MyShout/WEB-INF/lib/jersey-server-1.6.jar
./domains/domain1/applications/MyShout/WEB-INF/lib/jersey-bundle-1.11.jar
./domains/domain1/applications/MyShout/WEB-INF/lib/jersey-json-1.6.jar

Should I be packaging some other Jersey related jar files along with the
App?


Sreeram