users@jersey.java.net

Re: [Jersey] Resource Subclass

From: Martin Probst <mail_at_martin-probst.com>
Date: Fri, 26 Jun 2009 09:44:23 +0200

> when I try to go to http://localhost:9090/abc/Person, it fails with error
> message:
> SEVERE: A message body writer for Java type, class java.util.ArrayList, and
> MIME media type, application/xml, was not found
>
> Is there any way I can configure Jersey to find methods in base class as
> well?

I think it does find the method and tries to use it, but the method
returns an ArrayList<Person>, and Jersey doesn't know how to serialize
that to XML. So you need to provide a MessageBodyWriter that can turn
the ArrayList<Person> into a meaningful XML document.

Martin