hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jing Chen <jc...@centor.com>
Subject RE: HttpRecoverableException when using httpClient only in certai n situation
Date Wed, 05 May 2004 16:41:56 GMT
Hi Michael,

Thanks for your reply.  I was mistakenly submit the request twice - which
means that I am using the single instance for multiple thread!

There is another question about the log, I have setProperty for the log as
follows, but I don't see any output for httpClient ...  Why?



", "debug");

ons.httpclient", "debug");

ons.httpclient.Authenticator", "trace");

-----Original Message-----
From: Michael Becke [mailto:becke@u.washington.edu]
Sent: Tuesday, May 04, 2004 9:16 PM
To: Commons HttpClient Project
Subject: Re: HttpRecoverableException when using httpClient only in
certain si tuation

Hi Jing,

Are you using one instance of HttpClient from multiple threads?  If so, 
makes sure you have a look at 
<http://jakarta.apache.org/commons/httpclient/threading.html>.  If the 
problems continue please post some sample code and a wire log 


On May 4, 2004, at 6:39 PM, Jing Chen wrote:

> Hi,
> I am writing a web application using httpClient to connect to an 
> existing
> web application.  On the main menu, if I click a button, it is going to
> create a httpClient (and save the httpClient into session), then invoke
> process1 then process2, and pop up a new window to display the results.
> Both process1 and process2 use the httpClient to do a Get or Post 
> method.
> (If I click some other button, which will do process1 and process3 
> through
> httpClient without any problem.....)
> Then, on the new window, there is a button that will trigger the same 
> thing
> - by clicking it, it will invoke process1 and process2.  Both process1 
> and
> process2 are using the same client as before because the client comes 
> from
> the session.
> However, the process1 first get a recoverable exception:
> org.apache.commons.httpclient.HttpRecoverableException:
> java.net.SocketException: Socket closed
> then the httpclient retries, and got another recoverable exception:
> org.apache.commons.httpclient.HttpRecoverableException: Error in 
> parsing the
> status  line from the response: unable to find line starting with 
> "HTTP"
> I don't understand why I have a problem using httpClient in one 
> situation
> while no problem in another.  Seems that anything starts from the main 
> menu
> will be fine.  Isn't that wierd?
> Please help ...
> Thanks

To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message