sql server 2008 - Database connectivity using mssql2008 and jdbc -


so have setup code so

public static connection getconnection() {         try {             string dburl = "jdbc:sqlserver://localhost:1433;databasename=hrdb;             string user = "sa";             string pass = "r";              class.forname("com.microsoft.sqlserver.jdbc.sqlserverdriver");             connection conn = drivermanager.getconnection(dburl, user, pass);              return conn;         } catch (classnotfoundexception c) {             return null;         } catch (sqlexception s) {             system.out.println(s.tostring());             return null;         }     } 

however, when try connect database following exceptions.

com.microsoft.sqlserver.jdbc.sqlserverexception: driver not establish secure connection sql server using secure sockets layer (ssl) encryption. error: "java.lang.runtimeexception: not generate dh keypair". 


Comments