users@jersey.java.net

Re: Hangs when trying to read an entity

From: Imran M Yousuf <imyousuf_at_smartitengineering.com>
Date: Fri, 6 Aug 2010 23:16:21 +0600

Hi,

I have bypassed the problem by switching to Apache Http based Jersey
Client. The changes required were -
http://github.com/imyousuf/smart-util/commit/1de6cbed2238852cc2404da988ee78c944943581

I am still interested to know how to solve the main problem, please help!

Best Regards,

Imran

On Fri, Aug 6, 2010 at 7:58 PM, Imran M Yousuf
<imyousuf_at_smartitengineering.com> wrote:
> Hi,
>
> I am facing some problem regarding trying to read an entity using
> Jersey Client. When I am trying to read an entity from a
> ClientResponse I am getting it. Please find the snippet I am using
> below. I have tested the server with curl and it seems to work fine
> then. Am I missing any configuration in Client configuration?
>
> The client causing the problem -
> http://github.com/imyousuf/smart-util/blob/rest-util/rest/atom/src/test/java/com/smartitengineering/util/rest/atom/AppTest.java
> Summary:
>
> //Client initialization
>    DefaultClientConfig config = new DefaultClientConfig();
>    config.getClasses().add(FeedProvider.class);
>    config.getClasses().add(JSONRootElementProvider.App.class);
>    client = Client.create(config);
>
>
> //Lookup
>    WebResource resource = client.resource("http://localhost:9090/feed");
>    Feed feed = resource.get(Feed.class); // Hangs here
>
>
> Thread dump when trying to read as a string - http://pastebin.ca/1912277
> Thread dump when trying to read as a feed - http://pastebin.ca/1912278
>
> Please feel free to ask for any info. Thank you for the help in advance,
>
> Thank you,
>
> --
> Imran M Yousuf
> Smart IT Engineering Ltd.
> 25/5B, Block F, Haji Chinu Miah Road Bylane
> Joint Quarter, Mohammadpur
> Dhaka - 1207, Bangladesh
> Email: imran_at_smartitengineering.com
> Blog: http://imyousuf-tech.blogs.smartitengineering.com/
> Mobile: +880-1711402557
>



-- 
Imran M Yousuf
Entrepreneur & CEO
Smart IT Engineering Ltd.
25/5B, Block F, Haji Chinu Miah Road Bylane
Joint Quarter, Mohammadpur
Dhaka - 1207, Bangladesh
Email: imran_at_smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557