简体   繁体   中英

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.

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.

I had this issue connecting to a MySQL database that requires SSL to connect.

It turns out, for me, the driver version needed to be updated in order to properly-handle the trust store configuration in the JDBC URL.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM