users@jersey.java.net

Thread waits indefinitely using Apache HTTP based Jersey Client[WAS]Re: Problem switching to ApacheHttpClient in Jersey 1.0.2

From: Imran M Yousuf <imyousuf_at_smartitengineering.com>
Date: Tue, 17 Feb 2009 16:14:42 +0600

Hi,

While trying to fix how to integrate authentication in client API
using Apache HTTP based Jersey Client I applied 0002_2 on 0001 and
somehow went into a indefinite wait state and the thread dump from
that instance is also attached for reference. I came around that state
by applying 0002_1 instead of 0002_2. Another observation in this
regard is that the client requires re-initialization for every 5~6
POSTs'. I would be interested to help in this regard by any means
possible if required.

Best regards,

Imran

On Tue, Feb 17, 2009 at 12:57 PM, Imran M Yousuf
<imyousuf_at_smartitengineering.com> wrote:
> Hi,
>
> I am trying to integrate Spring Security with Jersey and in the client
> part I am trying to use Jersey Client and in order to make
> authentication easier I am trying to use jersey-contrib's
> jersey-apache-client. Before integrating the client I was getting HTTP
> Status 401 (as expected) and after integrating it I am getting the
> following exception:
> com.sun.jersey.api.client.ClientHandlerException:
> org.apache.commons.httpclient.ProtocolException: Unbuffered entity
> enclosing request can not be repeated.
> The full stacktrace is in the attached
> "com.smartitengineering.bookstore.ws.server.BookStoreResourcesTest.txt"
> file. The attached Java file is the source of the test file and the
> attached patch file is the diff for integrating the apache http based
> client.
>
> I would be grateful if someone could please guide me in fixing the
> problem. Any suggestion is most welcome. The complete source code is
> available at -
> http://repo.or.cz/w/smart-bookstore.git?a=shortlog;h=refs/heads/auth
>
> --
> Imran M Yousuf
> Software Engineer
> Smart IT Engineering
> Dhaka, Bangladesh
> Email: imran_at_smartitengineering.com
> Blog: http://imyousuf-tech.blogs.smartitengineering.com/
> Mobile: +880-1711402557
>



-- 
Imran M Yousuf
Entrepreneur & Software Engineer
Smart IT Engineering
Dhaka, Bangladesh
Email: imran_at_smartitengineering.com
Blog: http://imyousuf-tech.blogs.smartitengineering.com/
Mobile: +880-1711402557