This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

javax.net.ssl.SSLException: SSLSocketFactory is null. This can occur if javax.net.ssl.SSLSocketFacto

 
Yogesh Gandhi
Ranch Hand
Posts: 222
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 222
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 222
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 222
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 222
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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)
 
Guillaume Barry
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I found an easier solution. Bug is in fact the following : http://www-01.ibm.com/support/docview.wss?uid=swg1PM14425
I still present in was 8.0

In fact was don't have a default value for property "javax.net.ssl.trustStoreType". So in addition to "javax.net.ssl.trustStore" and "javax.net.ssl.trustStorePassword" add
"javax.net.ssl.trustStoreType=JKS"
Uppercase seems to be important in my environment.

You can do that adding a custom property to the JVM (process definition under the server properties)

Regards
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic