Topic
  • No replies
asksolutions
asksolutions
1 Post

Pinned topic HttpClient /SSL /NullPointerException/ WAS 6.1/JDK 1.5

‏2011-06-12T08:30:21Z |
While using HttpClient for making an SSL Connection I get the following Null Pointer Exception When the Application is deployed on WAS 6.1 and JDK 1.5. All the certificates are validated via the default trust store.
Exception in thread "Timeout guard" java.lang.NullPointerException
at com.ibm.websphere.ssl.protocol.SSLSocketFactory.createSocket(SSLSocketFactory.java:619)
at org.apache.commons.httpclient.protocol.SSLProtocolSocketFactory.createSocket(SSLProtocolSocketFactory.java:82)
at org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$1.doit(ControllerThreadSocketFactory.java:91)
at org.apache.commons.httpclient.protocol.ControllerThreadSocketFactory$SocketTask.run(ControllerThreadSocketFactory.java:158)
at java.lang.Thread.run(Thread.java:811)


HttpClient client = 

new HttpClient(); client.getHttpConnectionManager().getParams().setConnectionTimeout(30000); client.setState(

new HttpState());   

final PostMethod postRequest = 

new PostMethod(REQUEST_URL); postRequest.addParameter(
"xmldata", inputXml);   

final 

int status = client.executeMethod(postRequest); <----------------NullPointerException

Any pointers would be very much appreciated.
Thanks.