users@jersey.java.net

Re: [Jersey] JAX-RS Resource in OSGi bundle

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 12 Mar 2010 09:56:09 +0100

Hi,

I presume Actor a JAXB bean, correct?

Is the the server is logging the following message?

   A message body writer for Java type, Actor, and MIME media type,
application/json, was not found

This could be a OSGi bundling issue where the JSON stuff is not
correctly picked up.

Does the OSGi bundle include the Jersey jars?

Jakub, who is back next week, knows more about this area than I.

Paul.

On Mar 11, 2010, at 7:09 PM, Arun Gupta wrote:

> I converted a trivial JAX-RS web app [1] into an OSGi bundle and
> deployed on 3.1 nightly build. The resource is accessible correctly
> in web app but gives the following error in OSGi bundle:
>
> -- cut here --
> javax.ws.rs.WebApplicationException
> at
> com
> .sun
> .jersey.spi.container.ContainerResponse.write(ContainerResponse.java:
> 268)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application
> .WebApplicationImpl._handleRequest(WebApplicationImpl.java:1029)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application
> .WebApplicationImpl.handleRequest(WebApplicationImpl.java:941)
> at
> com
> .sun
> .jersey
> .server
> .impl
> .application
> .WebApplicationImpl.handleRequest(WebApplicationImpl.java:932)
> at
> com
> .sun
> .jersey.spi.container.servlet.WebComponent.service(WebComponent.java:
> 384)
> at
> com
> .sun
> .jersey
> .spi
> .container.servlet.ServletContainer.service(ServletContainer.java:451)
> at
> com
> .sun
> .jersey
> .spi
> .container.servlet.ServletContainer.service(ServletContainer.java:632)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:844)
> -- cut here --
>
> Any idea ?
>
> [1] http://blogs.sun.com/arungupta/entry/totd_124_using_cdi_jpa
>
> Thanks,
> -Arun
>
> --
> Blog: http://blogs.sun.com/arungupta
> Twitter: http://twitter.com/arungupta
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>