Andrew Norrie
Andrew Norrie

Reputation: 63

JDBC driver not working for XPage after upgrade to 9.0.1 FP3

I'm experiencing a problem connecting between Lotus Domino 9.0.1FP3 and a MSSQL database using the MS JDBC driver the same issue detailed in this question. Everything was fine in 9.0.1 but the applicaiton of FP3 has broken the link.

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

I've tried an upgrade of JDBC driver which didn't seem to make any difference like it seems to have for TomSta in his comments

I've tried setting encrypt=true & trustServerCertificate=true which didn't seem to make any difference either.

Is there a change to the Domino / SQL / Windows servers that I need to make with to resolve this issue?

My code and the location of the error is shown below:

    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;
} 

Upvotes: 1

Views: 1074

Answers (2)

Oliver Busse
Oliver Busse

Reputation: 3395

Upgrading to a Fixpack also causes the

<DominoBinary>\jvm\lib\security\java.policy

file to be changed to the default one, so if you changed something here (like for using Class.forName) you should add access granted to the class loader to work. I don't know if that's a cause but sometimes error messages are not referring to the root cause.

By the way: we experienced that the jDTS driver has a better performance (and less bugs) than the Microsoft driver. You may have a look at it despite your problem. http://jtds.sourceforge.net/

Upvotes: 4

tixo
tixo

Reputation: 61

This might have roots in SSLv3/TLS changes. Check this out:

http://support.microsoft.com/kb/2653857

Does my JDBC connection to the database use SSL or not?

Upvotes: 3

Related Questions