SQL Server database connection problem solving record in MyEclipse
December 12, 2016953 point heat1 liked it0 comments
Com.microsoft.sqlserver.jdbc.sqlserverexception: the driver was unable to establish a secure connection with SQL server by using secure socket layer (SSL) encryption.Error: "java.lang.runtimeexception: could not generate DH keypair".
This historical legacy problem has a long history, and the content on the Internet is similar. The solutions to the problem are also various, but they all end up with unclear answers. The audience is also confused. The bloggers also encounter this problem, and they haven't solved it for a long time. This article only makes a record to prepare for the unexpected need.
1. According to what is said on the Internet, the document has been replaced, but it still can't be solved
Let's talk about my test environment: Windows 10 + MyEclipse 8.6 + SQL Server 2012,
The first time I encountered this problem, I suddenly couldn't connect to the database. I immediately searched the Internet and saw the article mentioned at the beginning of CSDN. I thought it was so simple. According to the author's idea, I found the shortcut to the software in the menu, opened the installation directory of MyEclipse 8.6, and then finished the operation step by step,But the result is: the problem still exists, which makes me puzzled~
At last, I realized that I was wrong from the beginning
The correct way is to open MyEclipse 8.6, open windows, preference, Java, installed JRE, select JDK, and click Edit
Get the pathC: The user name is appdata, local, genuitec, common, binary, com.sun.java.jdk.win32.x86_1.6.0.013
And then, in this folder, do the above operations
Last but not least, restart the computer!Restart the computer!Restart the computer（Say important things three times)