users@jersey.java.net

[Jersey] Re: Jersey Test Framework returned entity strangeness

From: Mike Summers <msummers57_at_gmail.com>
Date: Wed, 8 Aug 2012 16:03:54 -0500

Our mistake.

The test was accepting JSON but hadn't turned-on POJO Mapping so of course
the returned JSON resulted in a null JAXB object. Accepting XML or turning
on POJO Mapping both worked.

Pilot error.

On Wed, Aug 8, 2012 at 9:21 AM, Pavel Bucek <pavel.bucek_at_oracle.com> wrote:

> You can send it directly to me if you have any concerns about publishing
> it here.
>
> Regards,
> Pavel
>
>
> On 8/8/12 3:19 PM, Mike Summers wrote:
>
> Sure, I'll see if I can extract a breaking test case without giving away
> what we're working on :-)
>
> On Wed, Aug 8, 2012 at 3:37 AM, Pavel Bucek <pavel.bucek_at_oracle.com>wrote:
>
>> Hi Mike,
>>
>> can you please share more info about your application? We are regularly
>> running lots of tests on Grizzly and it should work.. (sample
>> sources/reproducible testcase/maven project would be enough).
>>
>> Thanks,
>> Pavel
>>
>>
>> On 8/6/12 6:24 PM, Mike Summers wrote:
>>
>> I have a Jersey Test Framework Test that receives an object from the
>> server that contains a List<String>.
>>
>> The List is returned as null without any errors on the part of the
>> server or the client, however if I look at the ClientResponse entity as a
>> String I can see the correctly formatted JSON returned by the server. On
>> the server I've tried return both the object and the object embedded in a
>> JResponse entity, no difference in the result.
>>
>> I've also written a JUnit test using Jersey Client to run against the
>> live server and it has no problem receiving the server's object decoding a
>> valid List<String>.
>>
>> Has anyone seen this before? Suggestions?
>>
>> <dependency>
>> <groupId>com.sun.jersey.jersey-test-framework</groupId>
>> <artifactId>jersey-test-framework-grizzly</artifactId>
>> <version>1.12</version>
>> <scope>test</scope>
>> </dependency>
>>
>> Thanks-- Mike
>>
>>
>>
>
>