SQL Server database connection problem solving record in MyEclipse
December 12, 2016608 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
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 completed the operation step by step, but the result was: the problem is thatIt 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 path C: users \ \ user name / appdata / local / genuitec / common / binary / com.sun.java.jdk.win32.x86_1.6.0.013
In this folder, you can do the operation mentioned above
Last but not least, restart the computer!Restart the computer!Restart the computer!(say important things three times)