SQL Driver for MSSQL 2008 R2 and OpenJDK 17

Sumit Chaudhary 0 Reputation points
2025-09-04T13:53:49.5666667+00:00

Hi Guys,

I am connecting Microsoft SQL Server 2008 R2 (SP3-GDR) (KB4057113) - 10.50.6560.0 (X64) from RHEL9.6 system having openJDK17 on it but getting below error. I tried with SQL driver version 13,12 and 10 but result is same always. So can you please suggest the fix and correct SQL driver version to work with OpenJDK17 and MSSQL 2008 R2

[ ConnectorException ] [ Error details ] The server encountered an unexpected error while contacting target system. Please check the logs. The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server did not return a response. The connection has been closed. ClientConnectionId:4c46e372-53d1-4456-92cd-ea1cb44b6b08".

SQL Server Database Engine
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Erland Sommarskog 127.7K Reputation points MVP Volunteer Moderator
    2025-09-04T21:08:31+00:00

    That certainly sounds like a TLS problem. That build of SQL 2008 R2 should support TLS 1.2, but what about the operating system SQL Server is running on?

    It is worth mentioning that SQL Server 2008 R2 did not originally support TLS 1.2, and nor was TLS 1.2 support included in SP3, the last service pack (as TLS 1.2 was not yet defined by then), but this came in a later build. The version number you post is beyond that point, but you may want to double-check.


  2. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.