File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Sockets and Internet Protocols and the fly likes Apache HttpClient Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Sockets and Internet Protocols
Bookmark "Apache HttpClient "Target Server Failed to response" exception. " Watch "Apache HttpClient "Target Server Failed to response" exception. " New topic
Author

Apache HttpClient "Target Server Failed to response" exception.

Em Aiy
Ranch Hand

Joined: May 11, 2006
Posts: 226
I have a webservice which is accepting a POST method with XML. It is working fine then at some random occasion, it fails to communicate to the server throwing IOException with message `The target server failed to respond`. The subsequent calls work fine.

It happens mostly, when i make some calls and then leave my application idle for like 10-15 min. the first call which i make after that returns this error.

I tried couple of things ...

I setup the retry handler like



but this retey never got called. (yes i am using right instanceof clause). While debugging this class never being called.

I even tried setting up but no use. Can someone suggest what can i do now?


**IMPORTANT**
Besides figuring out why i am getting exception, one of the important concern i have is why isn't the retryhandler working here?


The difference between <b>failure</b> and <b>success</b> is often being <b>right</b> and being <b>exactly right</b>.
 
Don't get me started about those stupid light bulbs.
 
subject: Apache HttpClient "Target Server Failed to response" exception.
 
Similar Threads
How do I close a bound socket?
There is no Action mapped for action name prePaymentManager
Fake a post request from java class
Connecting JBoss with JMXConnectorFactory