Wednesday, April 7, 2010

HttpClient SocketException

12:57:05,812 ERROR [STDERR] java.net.SocketException: Software caused connection abort: socket write error
12:57:05,812 ERROR [STDERR] at java.net.SocketOutputStream.socketWrite0(Native Method)
12:57:05,812 ERROR [STDERR] at java.net.SocketOutputStream.socketWrite(Unknown Source)

If you are getting above exception when submitting data using HttpClient, Please check following things.

- If HttpClient is posting data to PHP site(Apache Web Server), check LimitRequestBody setting in PHP website(Apache Web Server).

Please refer http://httpd.apache.org/docs/1.3/mod/core.html#limitrequestbody

- If HttpClient is posting data to IIS (ASP site), check maxRequestLength attribute of httpRuntime Element in web.config file of ASP website in IIS.

Please refer http://msdn.microsoft.com/en-us/library/e1f13641%28VS.71%29.aspx

0 Java Junction comments: