Search code examples
javaweb-servicessslkeystoreweblogic-10.x

java web service client trying to access web service through SSL - TrustManagerFactoryImpl is not initialized


I'm a web service client and I'm connecting to the web service through SSL.

It's a 2-way SSL and the producer has shared the certificate. I did run the InstallCert.java, got the alias and created a Keystore. I'm using weblogic application server and I have placed my Keystore in it.

Now when I run it, I'm getting an error,

Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: 
                                      TrustManagerFactoryImpl is not initialized

Before this I could see that it is trying to load the identity certificate and the private key. But as per standards the producer isn't willing to share the private key with us.

Any suggestion on this would be of great help to me. Thanks.


Solution

  • I resolved it. I added my .cer file to cacerts which is referred by the weblogic server (Using keytool import). In the keystores section, I kept the default option (Demo identity and Demo trust). In the SSL section, I went to advanced, click on the checkbox ("Use JSSE SSL"). It worked.