Resolve MS SQL Server jdbc Connection Error

Job ID: 39564222

Budget: $10 – $30 USD

We need someone to resolve this error for connection in ms sql server.

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]. ClientConnectionId:390975bd-1e5d-4224-b1ab-4dd993c8f641
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:4271) ~[mssql-jdbc-12.8.1.jre11.jar!/:na]


when setting true we get the below error

com.microsoft.sqlserver.jdbc.SQLServerException: "encrypt" property is set to "true" and "trustServerCertificate" property is set to "true" 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]. ClientConnectionId:d2f0bd3e-28a4-47e2-adf9-dca31d0f13c2