我在使用 MS JDBC 驱动程序连接 Lotus Domino 9.0.1FP3 和 MSSQL 数据库时遇到问题,此问题中详述了相同的问题。在 9.0.1 中一切都很好,但 FP3 的应用程序断开了链接。
The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SSLv3 SSLContext not available". SSLv3 SSLContext not available
我已经尝试升级 JDBC 驱动程序,这似乎并没有像 TomSta 在他的评论中那样产生任何影响
我试过设置 encrypt=true & trustServerCertificate=true 这似乎也没有任何区别。
我需要对 Domino / SQL / Windows 服务器进行更改以解决此问题吗?
我的代码和错误位置如下所示:
public static ResultSet executeQuery(String connString, String userName, String pwd, String query) {
//example connString: "jdbc:sqlserver://10.203.32.16;DatabaseName=DBTest";
ResultSet rs = null;
Statement st = null;
Connection conn = null;
try {
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance();
conn = DriverManager.getConnection(connString, userName, pwd); //Error occurs here
st = conn.createStatement();
rs = st.executeQuery(query);
} catch (Exception e) {
if ( query != null ) {
System.out.println("Failed SQL query: " + query);
}
try {
if (rs != null) { rs.close(); }
} catch (SQLException sqlEx) { rs = null; }
try {
if (st != null) { st.close(); }
} catch (SQLException sqlEx) { st = null; }
try {
if (conn != null) { conn.close(); }
} catch (SQLException sqlEx) { conn = null; }
e.printStackTrace();
return null;
}
return rs;
}