commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 13342] New: - NullPointerException in HttpMethodBase.getResponseBodyAsString
Date Sun, 06 Oct 2002 06:31:53 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13342>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13342

NullPointerException in HttpMethodBase.getResponseBodyAsString

           Summary: NullPointerException in
                    HttpMethodBase.getResponseBodyAsString
           Product: Commons
           Version: 2.0 Alpha 1
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: HttpClient
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: ivelin@iname.com


The following code in a cocoon component, causes the NPE.
A delay seems to help sometimes.

-------------
      int htcode = httpClient.executeMethod( method );
       
      // @todo: fix-me
      // This sleep() is a temporary workaround 
      // to avoid NullPointerException in the next line.
      Thread.currentThread().sleep( 100 ); 

      String ret = method.getResponseBodyAsString();
---------------------

java.lang.NullPointerException 
at java.lang.String.<init>(String.java:399) 
at org.apache.commons.httpclient.HttpMethodBase.getResponseBodyAsString
(HttpMethodBase.java:579) 
at org.apache.cocoon.generation.WebServiceProxyGenerator.fetch
(WebServiceProxyGenerator.java:264)

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


Mime
View raw message