Hello everyone,
After 12 years, it has been decided to migrate from SQL Server 2008R2 to SQL Server 2022 Standard.
When running the JAR like this:
C:\WEBApp\JAVA\jdk-19.0.2\bin\java -jar C:\WEBApp\WebX.jar
I get the following error:
When running the JAR like this:
C:\WEBApp\JAVA\jdk-19.0.2\bin\java -Djdk.tls.client.protocols=TLSv1 -jar C:\WEBApp\WebX.jar
I get the following error:
Question: What needs to be fixed: the WebApp program, the Windows Server, or the SQL Server?
Thanks in advance for your possible answers.
After 12 years, it has been decided to migrate from SQL Server 2008R2 to SQL Server 2022 Standard.
- SQL Server 2022 is currently running on a Windows Server 2022 test environment.
- A self-signed certificate was installed.
- TLSv1.2 and TLSv1.3 were enabled in the Windows registry.
- OpenJDK19
- B4J 10.30, JServer (websocket)
- Tested the following drivers:
- mssql-jdbc-12.2.1-jre11.jar
- mssql-jdbc-12.10.2-jre11.jar
- mssql-jdbc-13.2.1-jre11.jar
- Connection string:
B4X:sql1.InitializeAsync("sql1","com.microsoft.sqlserver.jdbc.SQLServerDriver","jdbc:sqlserver://SERVERX:1433;databaseName=BD_X;encrypt=true;trustServerCertificate=true;",user,pass)
When running the JAR like this:
C:\WEBApp\JAVA\jdk-19.0.2\bin\java -jar C:\WEBApp\WebX.jar
I get the following error:
Error:
com.microsoft.sqlserver.jdbc.SQLServerException: "encrypt" property is set to "true" and "trustServerCertificate"
property is set to "false" but 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].
...
javax.net.ssl.SSLHandshakeException: The server selected protocol version TLS10 is not accepted by client preferences [TLS13, TLS12]
When running the JAR like this:
C:\WEBApp\JAVA\jdk-19.0.2\bin\java -Djdk.tls.client.protocols=TLSv1 -jar C:\WEBApp\WebX.jar
I get the following error:
error:
com.microsoft.sqlserver.jdbc.SQLServerException: "encrypt" property is set to "true" and "trustServerCertificate"
property is set to "false" but the driver could not establish a secure connection to SQL Server by using Secure
Sockets Layer (SSL) encryption: Error: No appropriate protocol (protocol is disabled or cipher suites are inappropriate).
...
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)
Question: What needs to be fixed: the WebApp program, the Windows Server, or the SQL Server?
Thanks in advance for your possible answers.