Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Please ask technical questions in the appropriate category. Thank you!

Oracle JDBC with SSL failing.

user-f4zs4Apr 24 2023

Hi Team,

we are using Wildfly 26 as application server and using the Oracle 19c. The communication works fine without any issues in non-ssl forum. However, When we enable the SSL, it throws exception saying Unable to initialize the key store with the following error.

Caused by: oracle.net.ns.NetException: Unable to initialize ssl context.
at com.x.y.z.jdbc..jdbc.driver.oracle@19.16.0.0.0//oracle.net.nt.CustomSSLSocketFactory.createSSLContext(CustomSSLSocketFactory.java:361)
at com.x.y.z.jdbc..jdbc.driver.oracle@19.16.0.0.0//oracle.net.nt.CustomSSLSocketFactory.getSSLContext(CustomSSLSocketFactory.java:313)
at com.x.y.z.jdbc..jdbc.driver.oracle@19.16.0.0.0//oracle.net.nt.CustomSSLSocketFactory.getSSLSocketEngine(CustomSSLSocketFactory.java:288)
at com.x.y.z.jdbc..jdbc.driver.oracle@19.16.0.0.0//oracle.net.nt.TcpsNTAdapter.newSSLEngine(TcpsNTAdapter.java:629)
at com.x.y.z.jdbc..jdbc.driver.oracle@19.16.0.0.0//oracle.net.nt.TcpsNTAdapter.connect(TcpsNTAdapter.java:223)
at com.x.y.z.jdbc..jdbc.driver.oracle@19.16.0.0.0//oracle.net.nt.ConnOption.connect(ConnOption.java:203)
at com.x.y.z.jdbc..jdbc.driver.oracle@19.16.0.0.0//oracle.net.nt.ConnStrategy.execute(ConnStrategy.java:620)
... 42 more
Caused by: oracle.net.ns.NetException: Unable to initialize the key store.
at com.x.y.z.jdbc.driver.oracle@19.16.0.0.0//oracle.net.nt.CustomSSLSocketFactory.getKeyManagerArray(CustomSSLSocketFactory.java:639)
at com.x.y.z.jdbc..jdbc.driver.oracle@19.16.0.0.0//oracle.net.nt.CustomSSLSocketFactory.createSSLContext(CustomSSLSocketFactory.java:338)
... 48 more
Caused by: java.io.IOException: keystore password was incorrect
at java.base/sun.security.pkcs12.PKCS12KeyStore.engineLoad(PKCS12KeyStore.java:2116)
at java.base/sun.security.util.KeyStoreDelegator.engineLoad(KeyStoreDelegator.java:222)
at java.base/java.security.KeyStore.load(KeyStore.java:1479)

Let know why its unable to load the keystore. Note: the keystore password is correctly provided. There is no issues with the keystore credentials.

JRE Version: 11

JDBC version: 19.16.0.0.0

Comments
Post Details
Added on Apr 24 2023
1 comment
1,397 views