users@jersey.java.net

[Jersey] Re: Jersey not working while running on root context

From: Jakub Podlesak <jakub.podlesak_at_oracle.com>
Date: Mon, 12 Sep 2011 18:35:16 +0200

Hi Sigmar,

I guess only you changed also some other configuration properties.
Do you rely on the standard JAXB providers? I.e. is the com.my.Model
class annotated with @javax.xml.bind.annotation.XmlRootElement
or @javax.xml.bind.annotation.XmlType? I guess not, and you use
a custom MessageBodyWriter, which is probably not contained in the updated
configuration.

~Jakub



On 12.9.2011 10:07, Sigmar Muuga wrote:
> Hello!
>
> I have the following problem:
>
> When deploying the app to the context root (/), message body writers
> stop working. I get errors like "Caused by:
> com.sun.jersey.api.MessageException: A message body writer for Java
> class com.my.Model and MIME media type application/xml was not found"
>
> When running the app in localhost, with maven jetty plugin and having
> the context path /myapp it all works.
>
> I googled around and read the docs but I don't have any idea, what may
> be wrong here...
>
> Sigmar
>
>