users@jersey.java.net

[Jersey] Re: JSON natural on GF 3.1 b40

From: Pavel Bucek <pavel.bucek_at_oracle.com>
Date: Mon, 31 Jan 2011 16:29:29 +0100

Hello Jakub,

generally - update your java runtime; unfortunately, we currently
available jdk versions don't have that recent jaxb version, so ..

I guess putting jaxb-api-osgi.jar [1] and jaxb-osgi.jar [2] into
glassfish/modules should work that out. Or you can upgrade to full
profile, which provides newer jaxb implementation.

Or, if you don't want to update your local glassfish installation, you
could be able to package jaxb-osgi.jar into war and deploy it with your
application; you might need to set classloader delegation to false
(sun-web.xml: <class-loader delegate="false"/>).

Regards,
Pavel

[1]
http://download.java.net/maven/2/javax/xml/bind/jaxb-api-osgi/2.2.2/jaxb-api-osgi-2.2.2.jar
[2]
http://download.java.net/maven/2/com/sun/xml/bind/jaxb-osgi/2.2.3-1/jaxb-osgi-2.2.3-1.jar

On 01/31/2011 03:45 PM, jmilkiewicz_at_gmail.com wrote:
> Hi
>
> I am not sure if this mail should not be sent to glassfish user group
> but i hope i can find some help here:
>
> I am trying to use JSON natural notation
>
> JAXBContext context = new JSONJAXBContext(JSONConfiguration.natural().build()...
>
> The application worked as a charm on GF 3.0.1 but on GF 3.1. b40 web
> profile (current the latest one as of yesterday) i got a nasty
> exception with following header message:
>
> SEVERE: NATURAL JSON notation configured, but JAXB RI 2.1.10 not
> found. For the recent builds to get this working correctly, you need
> even at least JAXB version 2.1.12. Please add it to your classpath!
> SEVERE: The provider class, class foo.bar.MyJAXBContextResolver, could
> not be instantiated. Processing will continue but the class will not
> be utilized
>
> Generally ,how to upgrade to JAXB 2.1 provided that JAXB 2 classes are
> already bundled within JDK?
>
>
> How to make an upgrade on GF 3.1 which does not have any of JAXB api/
> JAXB impl osgified versions at all ( GF 3.0.1 indeed had jaxb-api-osgi
> and jaxb-osgi.jar ) ?
>
> regards Jakub Milkiewicz
>
>