"Error creating SSL Socket Factory for client invoker: Error initializing socket factory SSL context: Can not find truststore url."

Solution Verified - Updated -

Issue

  • We are configuring our own TrustStore [1]:
TrustManagerFactory tmf, KeyManagerFactory kmf;

//Set up and confgure key/trust manager factories

SSLContext sslContext = SSLContext.getInstance("TLS");
sslContext.init(kmf.getKeyManagers(), tmf.getTrustManagers(), null);
HttpsURLConnection.setDefaultSSLSocketFactory(sslContext.getSocketFactory());
  • When doing this, we receive the following error message in our logs when invoking a web service using JBossWS Native:
ERROR [HTTPClientInvoker] Error creating SSL Socket Factory for client invoker: Error initializing socket factory SSL context: Can not find truststore url.
DEBUG [HTTPClientInvoker] Error creating SSL Socket Factory for client invoker.
java.io.IOException: Error initializing socket factory SSL context: Can not find truststore url.
  at org.jboss.remoting.security.SSLSocketBuilder.initializeSocketFactorySSLContext(SSLSocketBuilder.java:1369)     
  at org.jboss.remoting.security.SSLSocketBuilder.createCustomSocketFactory(SSLSocketBuilder.java:473)
  at org.jboss.remoting.security.SSLSocketBuilder.createSSLSocketFactory(SSLSocketBuilder.java:453)
  at org.jboss.remoting.security.SSLSocketBuilder.createSSLSocketFactory(SSLSocketBuilder.java:401)
  at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.createSocketFactory(HTTPSClientInvoker.java:142)
  at org.jboss.remoting.RemoteClientInvoker.<init>(RemoteClientInvoker.java:66)     
  at org.jboss.remoting.transport.http.HTTPClientInvoker.<init>(HTTPClientInvoker.java:144)
  at org.jboss.remoting.transport.http.ssl.HTTPSClientInvoker.<init>(HTTPSClientInvoker.java:65)
  • The HTTPS/SOAP request still works so it seems our custom TrustManager and truststore jks file is actually being used, but we are worried about the above error message which doesn't appear when using the JAX-WS RI (Metro) stack.

[1] http://docs.oracle.com/javase/6/docs/api/javax/net/ssl/HttpsURLConnection.html#setDefaultSSLSocketFactory(javax.net.ssl.SSLSocketFactory)

Environment

  • Red Hat JBoss Enterprise Application Platform (EAP)
    • 5
  • JBossWS Native

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content