I'm trying to get DBVis 8.0.7 to connect to a remote DB2 v9.7.5 database with SSL.
( The remote database only support SSL connections.)
From the DB2 command-line (i.e. not java) , I'm able to connect to the same database with SSL.
Now I'm trying to get JDBC SSL connections from DB-VIS working.
Has anyone else got SSL connections from DBV 8.0.7 to DB2 v9.7 working ?
When I try an SSL connection, DBVis throws exception: "java.lang.InternalError: internal error: SHA-1 not available".
The laptop is Win-7 x64.
The laptop has both JRE7 and JDK 1.7.0.
DBVis seems to use the JRE7.
I imported the db2 server certificate into my cacerts file.
I have not tested this, but looking at the DB2 documentation, I see at least one thing in your configuration that is not correct. The "sslConnection=true" setting should be a done as driver property, not as a Java VM system property. So remove it from dbvis.vmoptions and instead add it under Driver Properties in the Properties tab for the connection.
This class (com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl) seems to be part of the standard Oracle Java 1.7 jre (in file jsse.jar in directory jre\lib).
So I ensured that the system-environment-variable CLASSPATH includes this file , viz:
CLASSPATH=C:\Program Files\IBM\SQLLIB\java\db2java.zip;C:\Program Files\IBM\SQLLIB\java\db2jcc.jar;C:\Program Files\IBM\SQLLIB\java\sqlj.zip;C:\Program Files\IBM\SQLLIB\java\db2jcc_license_cu.jar;C:\Program Files\IBM\SQLLIB\bin;C:\Program Files\IBM\SQLLIB\java\common.jar;.;C:\Program Files\Java\jre7\lib\jsse.jar
So now I can't see why the ClassNotFound exception happens when the relevant jarfile is present on the CLASSPATH.
You should not have to change the CLASSPATH at all; the jsse.jar file should be included by default. In fact, adding things like this to the CLASSPATH may cause problems, because Java applies different rules for what a class can do depending on where it is loaded from.
To help you, I need some more information. First, exactly which JDBC driver are you using (vendor and version)? Please copy the information from the Connection Message area for the connection.
Also, can you mail the java.security and dbvis.vmoptions files to support at dbvis.com?
On that different workstation, DBVis 7.1.5 was installed and used JRE6(1.6.0_29) and DBVis is successfully able to connect via SSL to the DB2 database , using the jdbc driver for db2 supplied by DBVis, and using the SunJSSE security provider without problems.
I need to find a way to get SSL connections-to-db2 via SunJSSE working with JRE7.
I compared the JRE6 java.security file with that of JRE7 and there are several differences.
But anyway, it appears this is not a problem of DBVis.
For JRE7 with SunJSSE ,do not add these 2 lines to java.security:
( Note: these two lines work with JRE6 only, but they break JRE7 1.7.0_02 b13 at least).
(2) Add a driver property sslConnection=true to the DBVisualiser connection.
(3) If you are using the default cacerts file that comes with the JRE7, there's no need for any system property or driver property to identify it. If you specify a "javax.net.ssl.trustStore" driver-property, then ensure the filename is fully qualified (else you may get exception "the trustAnchors parameter must be non-empty" ).
If you are using your own truststore (not cacerts), and/or a non-default password then give relevant driver properties to DBbvisualiser on the connection.
For JRE7 with SunJSSE, try to use these 2 lines for java.security: