I use standard driver com.microsoft.sqlserver.jdbc.SQLServerDriver to connect to a MSSQL server. I run my program in Eclipse and encounter error:
Failed to obtain JDBC Connection; nested exception is com.microsoft.sqlserver.jdbc.SQLServerException:
The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption.
Error: "The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]"
My environment is openjdk version "11.0.11" 2021-04-20 LTS and the project use same JRE system library in Eclipse. The weird thing is, I package my project to JAR and it runs well in another machine, which is openjdk version "11.0.9.1" 2020-11-04 LTS.
A few months ago, I was able to run my program in the development environment, but now I fail. I may have made some changes to the development environment during this period, so I don't know if it has anything to do with the JDK version.
Any hint is welcome and thank you in advance.