users@glassfish.java.net

Re: Glassfish+jersey+json+natural convention and new jaxb

From: Jakub Podlesak <Jakub.Podlesak_at_Sun.COM>
Date: Thu, 09 Jul 2009 17:42:20 +0200

Hi,

could you try to bundle jaxb-2.1.12 jar with your war file
and set the following in the WEB-INF/sun-web.xml descriptor?

<class-loader delegate="false"/>

Does it help?

~Jakub

P.S. Attaching a sample sun-web.xml, so that you can just
      update the context root there and reuse

On Mon, Jun 29, 2009 at 08:25:37AM -0700, glassfish_at_javadesktop.org wrote:
> Hi,
> I want to deploy jersey application on glassfish v3 Preview and I mainly use json provider with natural convention. When I try deploy my app I get error:
>
> INFO: Initiating Jersey application, version 'Jersey: 1.1.0-ea 04/30/2009 06:59 PM'
>
> SEVERE: [failed to localize] error.jaxb.ri.2.1.10.missing()
> SEVERE: The provider class, class org.mycompany.core.rs.provider.CommonJaxbProvider, could not be instantiated. Processing will continue but the class will not be utilized
> java.lang.RuntimeException: [failed to localize] error.jaxb.ri.2.1.10.missing()
> at com.sun.jersey.api.json.JSONConfiguration.natural(JSONConfiguration.java:277)
>
>
> My configuration is analogous to described in:
> http://blogs.sun.com/japod/entry/configuring_json_for_restful_web
>
> How can I run my app? How to update or override jaxb in glassfish.
> I tried using lib/endorsed/ directory but it doesn't help.
>
> Could you help me?
> [Message sent by forum member 'rafik777' (rafik777)]
>
> http://forums.java.net/jive/thread.jspa?messageID=353422
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>