I'm using the Jersey 0.9 snapshot JARs with class files having a
timestamp as of Aug. 18.
I'm also using JDK 1.6.0_07.
I tried to use GenericEntity in a resource method as follows:
@Path("/kundenverwaltung")
@Produces(MediaType.APPLICATION_XML)
@Consumes(MediaType.APPLICATION_XML)
public class KundenverwaltungResource {
@GET
@Path("/kunden")
public GenericEntity<List<Kunde>> findKunden(@MatrixParam("nachname")
String nachname) throws KundeNotFoundException {
List<Kunde> result = kv.findKundenByNachname(nachname);
GenericEntity<List<Kunde>> entity = new
GenericEntity<List<Kunde>>(result) {};
return entity;
}
However, I get this error message:
19.08.2008 07:00:25 com.sun.jersey.spi.container.ContainerResponse write
SCHWERWIEGEND: A message body reader for Java type, class
java.util.ArrayList, and MIME media type, application/xml, was not found
Any hint is appreciated!