| Author |
javax.net.ssl.SSLException: SSLSocketFactory is null. This can occur if javax.net.ssl.SSLSocketFacto
|
Yogesh Gandhi
Ranch Hand
Joined: Dec 05, 2008
Posts: 176
|
|
2012-04-12 19:15:03,350 ERROR com.nucleus.los - javax.wsdl.WSDLException: WSDLException (at /WL5G3N0:definitions/WL5G3N0:types/xsd:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'https://osbsesoauat.hdfcbank.com:5142/Cashin_Service/PS_CashinService?SCHEMA%2FCashin_Service%2Fwsdl_schema%2FEnquiryResponse', relative to 'file:/usr/IBM/los/env_was_Cluster1Server1/SOAStackUAT_CashinService.WSDL'.: javax.net.ssl.SSLException: SSLSocketFactory is null. This can occur if javax.net.ssl.SSLSocketFactory.getDefault() is called to create a socket and javax.net.ssl.* properties are not set.
Dear Friends,
Can you please help me what could be the problem.
We are setting the trustStore and keyStore using System.setProperty
But somehow it is not picking up. Can someone please help me out regarding this exception. I am stuck here for 2 days.
|
 |
Yogesh Gandhi
Ranch Hand
Joined: Dec 05, 2008
Posts: 176
|
|
javax.net.ssl.SSLException: SSLSocketFactory is null. This can occur if javax.net.ssl.SSLSocketFactory.getDefault() is called to create a socket and javax.net.ssl.* properties are not set.
at com.ibm.websphere.ssl.protocol.SSLSocketFactory.createSocket(SSLSocketFactory.java:374)
at com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:62)
at com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:19)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1044)
at com.ibm.net.ssl.www2.protocol.https.b.getInputStream(b.java:49)
at java.net.URL.openStream(URL.java:1011)
at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(StringUtils.java:158)
at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(WSDLReaderImpl.java:842)
... 29 more
Posting the exception in formatted way.
|
 |
Yogesh Gandhi
Ranch Hand
Joined: Dec 05, 2008
Posts: 176
|
|
I have set the trust store jks file in javax.net.ssl.trustStore System property.
But still I am getting the message that SSLSocketFactory is null. This could be due to the reason javax.net.ssl.* property not set
There could be two reasons which I feel could be the reason for this failure
1) There is some property which I have not set in System
2) These properties needs to be set somewhere else and not in System class. (Please note that my class is being invoked as Thread by WebSphere).
Can anyone please help me regarding this error?
|
 |
Yogesh Gandhi
Ranch Hand
Joined: Dec 05, 2008
Posts: 176
|
|
System properties approach was not working for me as well.
What came to my rescue was the guide of IBM websphere given on
http://www.redbooks.ibm.com/redbooks/SG247660/wwhelp/wwhimpl/js/html/wwhelp.htm
if you search "CellDefaultTrustStore" in the above guide, you'll find a single page.
You can see CellDefaultTrustStore and NodeDefaultTrustStore.
Earlier i was adding certificate only to NodeDefaultTrustStore, but after reading the guide, i just wanted to try setting the certificate in CellDefaultTrustStore as well and it worked for me !!!
|
 |
Yogesh Gandhi
Ranch Hand
Joined: Dec 05, 2008
Posts: 176
|
|
Yogesh Gandhi wrote:System properties approach was not working for me as well.
What came to my rescue was the guide of IBM websphere given on
http://www.redbooks.ibm.com/redbooks/SG247660/wwhelp/wwhimpl/js/html/wwhelp.htm
if you search "CellDefaultTrustStore" in the above guide, you'll find a single page.
You can see CellDefaultTrustStore and NodeDefaultTrustStore.
Earlier i was adding certificate only to NodeDefaultTrustStore, but after reading the guide, i just wanted to try setting the certificate in CellDefaultTrustStore as well and it worked for me !!!
This can also work if I add the .cer file to CellDefaultTrustStore ONLY. (Addition to NodeDefaultTrustStore is not required)
|
 |
 |
|
|
subject: javax.net.ssl.SSLException: SSLSocketFactory is null. This can occur if javax.net.ssl.SSLSocketFacto
|
|
|