users@jersey.java.net

Re: [Jersey] can't output json

From: Jesus M. Rodriguez <jmrodri_at_nc.rr.com>
Date: Fri, 10 Jul 2009 11:22:45 -0400

On Fri, Jul 10, 2009 at 10:13 AM, Paul Sandoz<Paul.Sandoz_at_sun.com> wrote:
[snip]
>
> Maven developers, using JSON serialization support of JAXB beans when using
> the MIME media type "application/json" require a dependency on the
> jersey-json module (no explicit dependency on jaxb-impl is required). This
> module depends on the JAXB reference implementation version 2.1.10 or
> greater, and such a version is required when enabling support for the JAXB
> natural JSON convention. For all other supported JSON conventions any JAXB
> 2.x version may be utilized. The following dependency needs to be added to
> the pom:
>
> <dependency>
>    <groupId>com.sun.jersey</groupId>
>    <artifactId>jersey-json</artifactId>
>    <version>1.1.0-ea</version>
> </dependency>
>
> Non-maven developers require:
>
>    jackson-asl.jar, jettison.jar, jaxb-impl.jar, jaxb-api.jar,
> activation.jar, stax-api.jar
>
>    and additionally, if not depending on the jersey-bundle.jar, non-maven
> developers require:
>
>    jersey-json.jar

It helps to use the PROPER version of jersey-json. I was using 1.0 with
jersey-core 1.1.0-ea. I apologize for my n00b issues, once I changed it to
use -json 1.1.0-ea it works!

Thanks for the help.

jesus