0

I have a Java project that connects to SQL Server using mssql-jdbc-7.0.0.jre8.jar. When I run the project using "mvn exec:java" the code works just fine. But when I build the project into a jar using "mvn clean compile package" and copy the jdbc jar into the target directory and then try running using "java -jar " I get the error

ERROR connecting to SQL Server: com.microsoft.sqlserver.jdbc.SQLServerException: 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.    

Why does it work when not jarred, but doesn't work when jarred?

Saul
  • 73
  • 1
  • 8
  • refer to https://stackoverflow.com/questions/32766114/sql-server-jdbc-error-on-java-8-the-driver-could-not-establish-a-secure-connect – vb.stack Jun 20 '19 at 16:52
  • Thanks. That's showing the output in Linux but I'm working in Windows and don't find TSLV in the output of my job. Is there something parallel I should be looking at? – Saul Jun 20 '19 at 19:02

0 Answers0