As Marco mentioned you can add an custom configuration to your SQL Server database configuration.
With this setting Microsoft JDBC Driver for SQL Server won't validate the SQL Server TLS certificate.
Can you validate your connection string against this document:
Or, if unclear, post it in the comments without the actual uri or IP or anything that could reveal sensitive connection information.
Go Make It
Thank you for the answer!
This is what I get with the different connection URLs:
"Opening JDBC connection to localhost:1433/mendix_test_db failed with SQLState: 08S01 Error code: 0 Message: "The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target". ClientConnectionId:7e395ad4-9c08-44aa-992a-2310130f503c"
"Opening JDBC connection to jdbc:sqlserver://localhost:1433/mendix_test_db failed with SQLState: 08S01 Error code: 0 Message: "The TCP/IP connection to the host jdbc:sqlserver://localhost, port 1433 has failed. Error: "jdbc:sqlserver://localhost. Verify the connection properties. Make sure that an instance of SQL Server is running on the host and accepting TCP/IP connections at the port. Make sure that TCP connections to the port are not blocked by a firewall."