On Fri, Jul 10, 2009 at 4:54 AM, Paul Sandoz<Paul.Sandoz_at_sun.com> wrote:
>
> On Jul 9, 2009, at 11:35 PM, Jesus M. Rodriguez wrote:
>
>> I've been racking my brain trying to figure out why simple JSON output
>> doesn't work for me.
>> I'm getting this error:
>>
>> SEVERE: A message body writer for Java type, class
>> org.fedoraproject.candlepin.model.User, and MIME media type,
>> application/json, was not found
>>
>
> What are you dependencies?
>
> Please take note of the dependences in the following:
>
> https://jersey.dev.java.net/source/browse/*checkout*/jersey/tags/jersey-1.1.0-ea/jersey/dependencies.html
>
> Goto the JAXB section and take note of the JSON related dependencies that
> are required.
So the JAXB section states:
'XML serialization support of Java types that are JAXB beans requires
a dependency on the JAXB reference implementation version 2.x or
higher (see later for specific version constraints with respect to
JSON support). Deploying an application for XML serialization support
using JAXB with Java SE 6 requires no additional dependences, since
Java SE 6 ships with JAXB 2.x support.'
I'm using the 1.6.0 openjdk that comes with Fedora. I will try the Sun
official 1.6 to see if it
works any differently.
>
>
>> Full stack trace here: http://pastie.org/540558
>>
>> Also, how do you increase the logging of jersey?
>>
>
> If you increase the JDK default logging output to CONFIG you may get some
> additional output that will tell if certain components could not be created
> due to failed dependencies.
Thanks
jesus