I am using Jersey's GenericEntity to return a list as json.
However I'm getting the exception
A message body writer for Java type, class java.util.Arrays$ArrayList, and MIME media type, application/xml, was not found
16-May-2011 11:16:31 com.sun.jersey.spi.container.ContainerResponse traceException
SEVERE: Mapped exception to response: 500 (Internal Server Error)....
I know this means that Jersey is not setup to map to json properly.
Where do I need to give more information to jersey. I am not using Maven.
The code that breaks is
List<String> list = Arrays.asList("test", "as");
return new GenericEntity<List<String>>(list) {};