I am on GlassFish 3.1.1 and recently started running into this really
vexing problem lately..
Tried to use ArrayList instead of Vector and that has same issue. This is
what I see in log:
[#|2013-08-12T00:27:07.043-0700|SEVERE|glassfish3.1.1|com.sun.jersey.spi.container.ContainerResponse|_ThreadID=393;_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.Vector, and Java type class
java.util.Vector, and MIME media type application/xml was not found
The failing method is as follows:
@GET
@Path("{id}/openorders")
@Produces({"application/xml", "application/json"})
public Response findOpenOrdersSince(@Context SecurityContext context,
@PathParam("id") Long id,
@QueryParam("since") Long since) {
Vector<OrderDetail> result =
getJpaController().findOpenOrdersSince(id, since);
return Response.ok(result).build();
}