hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "COURTAULT Francois" <Francois.COURTA...@gemplus.com>
Subject RE: HttpClient 2.0: Null pointer exception
Date Thu, 29 Jul 2004 12:36:21 GMT
Hello,

Thanks for answering.

Yes it is a stock version of HttpClient: no change in MultiThreadedHttpConnectionManager or
HttpConnection source files.

I will try the wire/debug log when I have enough time (I will be on hollidays from August
the 2nd to August 22th) and let you know.

Best Regards.

-----Original Message-----
From: Michael Becke [mailto:becke@u.washington.edu]
Sent: jeudi 29 juillet 2004 14:20
To: Commons HttpClient Project
Subject: Re: HttpClient 2.0: Null pointer exception


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:  
> commons-httpclient-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:  
> commons-httpclient-dev-help@jakarta.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-httpclient-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-httpclient-dev-help@jakarta.apache.org


Mime
View raw message