Start a new topic

DBVisualizer and Oracle SSL Connectivity

[This topic is migrated from our old forums. The original author name has been removed]
[Attachment has been removed.]

Hi All, I have successfully connected from a stand alone java program to Oracle Database over SSL Here is sample java code DriverManager.registerDriver(new OracleDriver()); Security.insertProviderAt(new OraclePKIProvider(), 3); String url = "jdbc:oracle:thin:@(DESCRIPTION=(ADDRESS=(PROTOCOL=tcps)(HOST=myhostname)(PORT=2484))(CONNECT_DATA=(SERVICE_NAME=orcl)))"; Properties props = new Properties(); props.setProperty("user", "user"); props.setProperty("password", "password"); props.setProperty("javax.net.ssl.trustStore", "cwallet.sso"); props.setProperty("javax.net.ssl.trustStoreType", "SSO"); These are following jar files are needed for this connection ojdbc6.jar, orapki.jar, ojpse.jar, osdt_cert.jar and osdt_core.jar. I have added these jar files to $JAVA_HOME/lib/ext directory. Added following line to $JAVA_HOME\lib\security\java.security file security.provider.1=oracle.security.pki.OraclePKIProvider Added following Driver properties "javax.net.ssl.trustStore", "cwallet.sso" "javax.net.ssl.trustStoreType", "SSO" This OraclePKIProvider class from orapki.jar file. This class is not able to read from the DBVisualizer. I have included log file for your review. What are additional configurations are needed to make this working? Thanks a lot for your help - Ravi

[This reply is migrated from our old forums.]

Re: DBVisualizer and Oracle SSL Connectivity
Ravi, We have no experience with using Oracle's SSL support but since it works with your program it should work in DbVisualizer as well. I see you have copied jar files to the $JAVA_HOME/lib/ext folder. This is not recommended, instead you should load the jar files in the DbVisualizer Driver Manager in Tools->Driver Manager. for the Oracle driver entry. Are there any dynamic libraries (.so) involved? For further support related to this, please use the Help->Contact Support form in DbVisualizer. It collects useful details about your setup that helps us a lot. Regards Roger
[This reply is migrated from our old forums. The original author name has been removed]

Re: DBVisualizer and Oracle SSL Connectivity
Hi Roger, There are no .so files are involved and only jar files. I am able to get same error message from standalone java code, when oraclepki.jar is not included in the program. So DBVisualizer is not reading oraclepki.jar file. In this jar file contains security provider class(security.provider.3=oracle.security.pki.OraclePKIProvider). I understand for reading Driver classes, jar files are loaded Tools --> Driver Manager --> Driver File paths. What about Custom Security Provider classes and how are they loaded into DBVisualizer? This information is needed to resolve this issues. Thanks once again for your help Ravi Edited by: singareddy on Nov 19, 2015 8:43 PM
[This reply is migrated from our old forums.]

Re: DBVisualizer and Oracle SSL Connectivity
Ravi, In your working Java program are you using the exact same jar files and Java version as in DbVisualizer? I don't know whether enabling debugging of the SSL package will give more details but it is worth a try. Add the following on a new row in Tool Properties and the General pane's Java Properties text box: -Djavax.net.debug=all Hopefully it will give more information what is loaded whenever trying to connect. Regards Roger
[This reply is migrated from our old forums.]

Re: DBVisualizer and Oracle SSL Connectivity
Hi Ravi, Regarding your question about the security provider JAR file, you need to load it in the Driver Manager along with the driver JAR files in order for the driver classes to see it. Best Regards, Hans