File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Websphere and the fly likes nullpointer at SSLSocketFactory.createSocket( Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "nullpointer at SSLSocketFactory.createSocket(" Watch "nullpointer at SSLSocketFactory.createSocket(" New topic

nullpointer at SSLSocketFactory.createSocket(

v vilches

Joined: Feb 18, 2013
Posts: 1

I am attempting to make a HTTPS POST call from my Websphere application. Locally on my machine the below code works but when I move it up to the development environment it gives a null pointer exception on the below line.

URL url = null;
HttpsURLConnection conn = null;
thirdpartyComponentFacade.setErrorMessage( null );

try {

url = new URL(enrollmentSSOURL);

conn = (HttpsURLConnection)url.openConnection();

conn.setDoInput (true);
conn.setDoOutput (true);
conn.setUseCaches (false);


System.out.println("Connect: " + conn.toString());

DataOutputStream output = new DataOutputStream(conn.getOutputStream()); --> NullPointer:


[2/18/13 15:35:05:348 CST] 00000027 SystemErr R java.lang.NullPointerException
[2/18/13 15:35:05:349 CST] 00000027 SystemErr R at
[2/18/13 15:35:05:349 CST] 00000027 SystemErr R at
[2/18/13 15:35:05:349 CST] 00000027 SystemErr R at
[2/18/13 15:35:05:350 CST] 00000027 SystemErr R at
[2/18/13 15:35:05:350 CST] 00000027 SystemErr R at
Tony Stoyle

Joined: May 16, 2002
Posts: 11
Did you ever resolve this? Getting the same...

anindya halder

Joined: Oct 03, 2012
Posts: 7
Any solution?? I am facing the same problem too........
Runs fine in localinstance and throws nullpointerexception in live instance...
anandraj tadkal
Ranch Hand

Joined: Feb 22, 2011
Posts: 98

There could be multiple scenarios where you can experience such NullPointerException.

Could you please paste the complete error stack trace here.

Few of the common SSL issues are listed below.


Follow us on facebook:
I agree. Here's the link:
subject: nullpointer at SSLSocketFactory.createSocket(
It's not a secret anymore!