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(HttpMethodBase.java:2152) GCSM1Container at org.apache.commons.httpclient.HttpMethodBase.readResponse(HttpMethodBase.java:1951) GCSM1Container at org.apache.commons.httpclient.HttpMethodBase.processRequest(HttpMethodBase.java:2659) GCSM1Container at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java: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]