I am trying to connect with java 7 to sql server 2014 and I get the following error:
The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "SQL Server returned an incomplete response." The connection has been closed. "
the code I'm using is:
driver ="com.microsoft.sqlserver.jdbc.SQLServerDriver";
url ="jdbc:sqlserver://Ip:port;databasename=xxx";
user = "xxx";
pass = "xxx";
Class.forName(driver);
connection = DriverManager.getConnection(url, user, pass);
Download the .jar files from Msdn download Msdn Downloads and I used : sqljdbc.jar, sqljdc4.jar, sqljdbc41.jar and sqljdbc42.jar.
Thanks in advance.