You are viewing a plain text version of this content. The canonical link for it is here.
Posted to httpclient-users@hc.apache.org by Steve Hall <sh...@starmountsystems.com> on 2009/04/14 18:31:40 UTC

NullPointer with HttpClient 3.1 + IBM 1.4.1 JRE

All,

I did some work integrating with a credit card authorizer over https 
using the HttpClient 3.1. Proper connection timeouts are very important 
to the authorizer. All of my testing, with a sun jdk worked fine, 
however when I switched to the production JDK (ibm 1.4.1) I get a null 
pointer in the ibm jsse implementation if i set a connection timeout 
(see log below). I realize this is NOT a problem with HttpClient but 
rather with the ibm jsse implementation, but does anyone know a work 
around for it.

Thanks
Steve


    java.lang.NullPointerException
    at com.ibm.jsse.bg.setTcpNoDelay(Unknown Source)
    at 
org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:721)
    at 
org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
    at 
org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
    at 
org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org


Re: NullPointer with HttpClient 3.1 + IBM 1.4.1 JRE

Posted by Oleg Kalnichevski <ol...@apache.org>.
On Tue, Apr 14, 2009 at 11:31:40AM -0500, Steve Hall wrote:
> All,
> 
> I did some work integrating with a credit card authorizer over https 
> using the HttpClient 3.1. Proper connection timeouts are very important 
> to the authorizer. All of my testing, with a sun jdk worked fine, 
> however when I switched to the production JDK (ibm 1.4.1) I get a null 
> pointer in the ibm jsse implementation if i set a connection timeout 
> (see log below). I realize this is NOT a problem with HttpClient but 
> rather with the ibm jsse implementation, but does anyone know a work 
> around for it.
> 
> Thanks
> Steve
>

Hi Steve,

Early releases of IBM JSSE are known to be very buggy. Please make sure
the JVM is at the latest patch level. Alternatively, consider upgrading
to a newer IBM JDK (1.4.2.x or 1.5.0.x). Those versions should come with
a better JSSE implementation. You may also consider upgrading to
HttpClient 4.0 as the last resort. HttpClient 4.0 has a much more
flexible API compared to 3.x and it should be easier to customize its
connection management code so that it does not trigger any of IBM JSSE
bugs.

Hope this helps

Oleg



> 
>    java.lang.NullPointerException
>    at com.ibm.jsse.bg.setTcpNoDelay(Unknown Source)
>    at 
> org.apache.commons.httpclient.HttpConnection.open(HttpConnection.java:721)
>    at 
> org.apache.commons.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1361)
>    at 
> org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:387)
>    at 
> org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
> For additional commands, e-mail: httpclient-users-help@hc.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: httpclient-users-unsubscribe@hc.apache.org
For additional commands, e-mail: httpclient-users-help@hc.apache.org