You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by kunal ashar <ka...@yahoo.co.uk> on 2006/09/26 14:01:56 UTC

Http Recoverable Exception

Hi,
   
  We are using commons-httpclient-2.0.2.jar for client program. 
   
  Intermittently we are getting the following exception when we try to post the message:
   
  ************
  Exception occured org.apache.commons.httpclient.HttpRecoverableException: java.net.SocketTimeoutException: Read timed out
  20-Sep-2006 10:52:25 org.apache.commons.httpclient.HttpMethodBase processRequest
INFO: Recoverable exception caught when processing request
  *****************
   
  Is this exception occures while sending the request it self? or is it related to not getting the response from the server?
   
  We are using the followign method for posting:
  -------------------
  httpMethod.setRequestBody(myRequestMsg);
   int statusCode = m_objHttpClient.executeMethod(httpMethod);
   strHttpResponse = httpMethod.getResponseBodyAsString();
   
  Here httpMethod  PostMethod and m_objHttpClient is HttpClient object. We are using MultiThreadedHttpConnectionManager.
  ------------
   
  Any is help is appreciated. 
   
  Thanks
  Kunal
   
  
 

 		
---------------------------------
 To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.

Re: Http Recoverable Exception

Posted by Oleg Kalnichevski <ol...@apache.org>.
kunal ashar wrote:
> Hi,
>    
>   We are using commons-httpclient-2.0.2.jar for client program. 
>    
>   Intermittently we are getting the following exception when we try to post the message:
>    
>   ************
>   Exception occured org.apache.commons.httpclient.HttpRecoverableException: java.net.SocketTimeoutException: Read timed out
>   20-Sep-2006 10:52:25 org.apache.commons.httpclient.HttpMethodBase processRequest
> INFO: Recoverable exception caught when processing request
>   *****************
>    
>   Is this exception occures while sending the request it self? or is it related to not getting the response from the server?
>    
>   
Kunal,

java.net.SocketTimeoutException can be thrown only while reading an HTTP response. Such exceptions are perfectly normal if the network is congested (slow) or the socket timeout value is too low. 

Hope this helps,

Oleg


>   We are using the followign method for posting:
>   -------------------
>   httpMethod.setRequestBody(myRequestMsg);
>    int statusCode = m_objHttpClient.executeMethod(httpMethod);
>    strHttpResponse = httpMethod.getResponseBodyAsString();
>    
>   Here httpMethod  PostMethod and m_objHttpClient is HttpClient object. We are using MultiThreadedHttpConnectionManager.
>   ------------
>    
>   Any is help is appreciated. 
>    
>   Thanks
>   Kunal
>    
>   
>  
>
>  		
> ---------------------------------
>  To help you stay safe and secure online, we've developed the all new Yahoo! Security Centre.
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: httpclient-user-help@jakarta.apache.org