users@jersey.java.net

[Jersey] Fw: JAXBJSONContext in Glassfish 3.1

From: Ronak Patel <ronak2121_at_yahoo.com>
Date: Sun, 27 Mar 2011 08:31:23 -0700 (PDT)

Well I spent the whole day swapping out different versions of JAXB in and out...and am getting tired.

Have you ever been successful deploying a JAX-RS Jersey Service on Glassfish 3.1 with JDK 6 update 24?

This is a VERY common configuration so what's the deal?


________________________________
From: Tatu Saloranta <tsaloranta_at_gmail.com>
To: Ronak Patel <ronak2121_at_yahoo.com>
Sent: Saturday, March 26, 2011 10:55 AM
Subject: Re: [Jersey] JAXBJSONContext in Glassfish 3.1

On Sat, Mar 26, 2011 at 10:22 AM, Ronak Patel <ronak2121_at_yahoo.com> wrote:
> Hi All,
> I'm trying to upgrade to the latest versions of HIbernate 3.6, Hibernate
> Search, Hibernate Spatial and Glassfish 3.1.
> My RESTful Web Service defines custom JAXBJSONContexts for my JAXB beans.
> Everything used to work fine on Glassfish 3.0.1.
> However, after upgrading to Glassfish 3.1, I'm getting the following errors:
> 2011-03-22 05:39:17,322 ERROR ContextLoader:225 - Context initialization
> failed
> java.lang.VerifyError: (class: com/events/controller/NaturalJAXBProvider,
> method: <init> signature: ()V) Bad type in putfield/putstatic
> I am running JDK 1.6 on MacOSX.
> Has anyone ever dealt with this?
> How do you solve this?

Nope, but that looks like a library version conflict: version
 used to
compile one of jars differs from one with which it is deployed. In
this case some type passed to construct of class being mentioned.

-+ Tatu +-