Hi Ortwin Gluck,

We still experiencing the problem with "connection reset" even after the "false safe" mechanism you have provided. What would cause it. BTW, commons-httpclient-3.0-rc2's chunking capability is good right..

Saminda
Ortwin Glück wrote:

Saminda,

You are speaking about a connection failure while executing a POST method. Please read "Automatic exception recovery" in http://jakarta.apache.org/commons/httpclient/exception-handling.html

For transaction safety reasons HttpClient does not automatically retry the request in your case. Consider implementing your own HttpMethodRetryHandler as outlined in the documentation above.

BTW:
I see you are implementing your own classes for chunked streaming. You will benefit of the upcoming http-common library of HttpClient 4 that contains such functionality ready to be reused. Actually you could already reuse the classes present in HttpClient 3, if HttpClient is a hard dependency of your project anyway.

Hope that helps. Cheers

Ortwin Glück

Saminda Abeyruwan wrote:

Hi Devs,

I'm a Axis2 soap stack contributor. We use the functionality of commons-httpclient-3.0-rc2 in our transport layer. When we writing test cases, we have come accorss with the following exception in the following environment.

Linux(Ubuntu)/2.6.10-5-386 i386  java/1.4.2_08 and maven/1.0.2.

Exception is ,

org.apache.axis2.AxisFault: Connection reset; nested exception is: java.net.SocketException: Connection reset; nested exception is: org.apache.axis2.AxisFault: Connection reset; nested exception is: java.net.SocketException: Connection reset at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:139)
    at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:87)
at org.apache.axis2.clientapi.TwoWayTransportBasedSender.send(TwoWayTransportBasedSender.java:34) at org.apache.axis2.clientapi.InOutMEPClient.invokeBlocking(InOutMEPClient.java:174)
    at org.apache.axis2.clientapi.Call.invokeBlocking(Call.java:90)
at org.apache.axis2.engine.CharctersetEncodingTest.runTest(CharctersetEncodingTest.java:105) at org.apache.axis2.engine.CharctersetEncodingTest.runtest(CharctersetEncodingTest.java:124) at org.apache.axis2.engine.CharctersetEncodingTest.testSimpleString(CharctersetEncodingTest.java:128)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.junit2.JUnitStarter.main(JUnitStarter.java:31)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:78) Caused by: org.apache.axis2.AxisFault: Connection reset; nested exception is: java.net.SocketException: Connection reset at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:189) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.invoke(CommonsHTTPTransportSender.java:109)
    ... 30 more
Caused by: java.net.SocketException: Connection reset
    at java.net.SocketInputStream.read(SocketInputStream.java:168)
    at java.io.BufferedInputStream.fill(BufferedInputStream.java:183)
    at java.io.BufferedInputStream.read(BufferedInputStream.java:201)
at org.apache.commons.httpclient.HttpConnection.isResponseAvailable(HttpConnection.java:897) at org.apache.commons.httpclient.HttpMethodBase.readResponseBody(HttpMethodBase.java:1691) at org.apache.commons.httpclient.HttpMethodBase.readResponseBody(HttpMethodBase.java:1634) at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1597) at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:995) at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:393) at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:168) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:393) at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:346) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.transportConfigurationPOST(CommonsHTTPTransportSender.java:401) at org.apache.axis2.transport.http.CommonsHTTPTransportSender.writeMessageWithCommons(CommonsHTTPTransportSender.java:167)
    ... 31 more

======================================

which is initiated from HTTPClient.excuiteMethod()

But the test case work nicely with other environments such as Windos XP JVM/1.4. Some other Linux distros experiancing the "connection reset" problem occationally. Would someone help us to sort out this problem. Does this has to do with the JVM i'm using in my Env.
Saminda



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to