locked
The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption (urgent) RRS feed

  • Question

  • Hi,

    I get the following exception when attemption to create a connection from my windowsserver to our SQL Server:

    java.ext.dirs: C:\Program Files (x86)\Java\jdk1.5.0_16\jre\lib\ext
    Exception in thread "main" com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server returned an incomplete response. The connection has been closed.".
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1352)
    at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1533)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:1042)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:817)
    at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:700)
    at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:842)
    at java.sql.DriverManager.getConnection(DriverManager.java:525)
    at java.sql.DriverManager.getConnection(DriverManager.java:140)
    at com.tonbeller.tbutils.sqlconnect.SqlConnect.getConnectionFromDriverManager(SqlConnect.java:429)
    at com.tonbeller.tbutils.sqlconnect.SqlConnect.internalGetConnectionFromDriverManager(SqlConnect.java:302)
    at com.tonbeller.tbutils.sqlconnect.SqlConnectDataSource.getConnection(SqlConnectDataSource.java:49)
    at com.tonbeller.tbutils.sqlconnect.SqlConnectDataSource.getConnection(SqlConnectDataSource.java:44)
    at com.tonbeller.tbutils.sqlconnect.DbTypeFactory.instance(DbTypeFactory.java:26)
    at com.tonbeller.tbutils.sqlconnect.SqlConnect.wrapDataSource(SqlConnect.java:384)
    at com.tonbeller.tbutils.sqlconnect.SqlConnect.getDataSource(SqlConnect.java:157)
    at com.tonbeller.wll.db.dao.DbUtils.connectToDb(DbUtils.java:51)
    at com.tonbeller.wll.db.blockeddao.SlBlockedDaoFactory.loadNext(SlBlockedDaoFactory.java:143)
    at com.tonbeller.wll.pepindex.MakeIndices.createOneIndex(MakeIndices.java:320)
    at com.tonbeller.wll.pepindex.MakeIndices.createIndicesOfOneList(MakeIndices.java:200)
    at com.tonbeller.wll.pepindex.MakeIndices.createAllIndices(MakeIndices.java:120)
    at com.tonbeller.wll.pepindex.MakeIndices.main(MakeIndices.java:634)
    Caused by: java.io.IOException: SQL Server returned an incomplete response. The connection has been closed.
    at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.ensureSSLPayload(IOBuffer.java:607)
    at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.readInternal(IOBuffer.java:664)
    at com.microsoft.sqlserver.jdbc.TDSChannel$SSLHandshakeInputStream.read(IOBuffer.java:656)
    at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.readInternal(IOBuffer.java:851)
    at com.microsoft.sqlserver.jdbc.TDSChannel$ProxyInputStream.read(IOBuffer.java:839)
    at com.sun.net.ssl.internal.ssl.InputRecord.readFully(InputRecord.java:293)
    at com.sun.net.ssl.internal.ssl.InputRecord.read(InputRecord.java:331)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:782)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1089)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1116)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1100)
    at com.microsoft.sqlserver.jdbc.TDSChannel.enableSSL(IOBuffer.java:1483)
    ... 19 more

    Thank you

    Tuesday, May 2, 2017 3:02 PM

All replies