users@jersey.java.net

Re: Problem switching to ApacheHttpClient in Jersey 1.0.2

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

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.

Hi,

I have fixed the problem, but not sure whether I have done it in the
right way or not. You can review the patch for it in the attachment
(0002_1*.patch).

Best regards,

Imran

> 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