Hello Francois,

This a pretty strange location for a NPE. Are you using a stock version of HttpClient or have there been any changes made to MultiThreadedHttpConnectionManager or HttpConnection? Also please post a wire/debug log <http://jakarta.apache.org/commons/httpclient/logging.html> of a session where this problem occurs.

Thanks,

Mike

On Jul 28, 2004, at 1:24 PM, COURTAULT Francois wrote:

Hello,

We have a multi threaded Java program which send HTTP POST to a server. Sometimes we got this stack trace:

java.lang.NullPointerException
GCSM1Container at
org.apache.commons.httpclient.HttpParser.readRawLine(HttpParser.java: 109)
GCSM1Container at
org.apache.commons.httpclient.HttpParser.readLine(HttpParser.java:135)
GCSM1Container at
org.apache.commons.httpclient.HttpParser.parseHeaders(HttpParser.java: 172)
GCSM1Container at
org.apache.commons.httpclient.HttpMethodBase.readResponseHeaders(HttpMe thodBase.java:2152)
GCSM1Container at
org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBas e.java:1951)
GCSM1Container at
org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodB ase.java:2659)
GCSM1Container at
org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.jav a:1093)
GCSM1Container at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java: 675)
GCSM1Container at
org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java: 529)



Any idea or fix.

Best Regards.

PS: All the thread has an access to a singleton class which performs HTTP POST requests with the following logic:

Singleton initialization:
MultiThreadedHttpConnectionManager = new MultiThreadedHttpConnectionManager();
HTTPClient httpClient = new HttpClient(httpConnectionManager);



Method sending the POST logic: try { PostMethod postMethod = new PostMethod(); httpClient.executeMethod(postMethod); response = postMethod.getResponseBodyAsString(); } catch(....) finally { postMethod.releaseConnection(); }

---------------------------------------------------------------------
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