This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Websphere and the fly likes nullpointer at SSLSocketFactory.createSocket(SSLSocketFactory.java:362) Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Products » Websphere
Reply Bookmark "nullpointer at SSLSocketFactory.createSocket(SSLSocketFactory.java:362)" Watch "nullpointer at SSLSocketFactory.createSocket(SSLSocketFactory.java:362)" New topic
Author

nullpointer at SSLSocketFactory.createSocket(SSLSocketFactory.java:362)

v vilches
Greenhorn

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);
conn.setRequestMethod("POST");


conn.setConnectTimeout(Integer.parseInt(connectTimeout));
conn.setReadTimeout(Integer.parseInt(readTimeout));

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

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

stacktrace:

[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 com.ibm.websphere.ssl.protocol.SSLSocketFactory.createSocket(SSLSocketFactory.java:362)
[2/18/13 15:35:05:349 CST] 00000027 SystemErr R at com.ibm.net.ssl.www2.protocol.https.b.afterConnect(b.java:39)
[2/18/13 15:35:05:349 CST] 00000027 SystemErr R at com.ibm.net.ssl.www2.protocol.https.c.connect(c.java:70)
[2/18/13 15:35:05:350 CST] 00000027 SystemErr R at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1040)
[2/18/13 15:35:05:350 CST] 00000027 SystemErr R at com.ibm.net.ssl.www2.protocol.https.a.getOutputStream(a.java:51)
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: nullpointer at SSLSocketFactory.createSocket(SSLSocketFactory.java:362)
 
Similar Threads
struts2.0 application issues
Websphere open JMS
websphere server starting error
Problem in Hyperion SDK (Brio) configuration in WSAD
Error : WSVR0068E: Attempt to start EnterpriseBean