sqlserver ssl連接問題 java1.6

服務器報錯如下:

 Caused by: 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 returned an incomplete response. The connection has been closed. ClientConnectionId:e8dd5a3f-2464-4d24-aca9-4c2785c34ff4".

解決方式:

jdk1.6.0_43\jre\lib\ext目錄下加入bcprov-ext-jdk15on-1.54.jar、bcprov-jdk15on-1.54.jar兩個jar包

jdk1.6.0_43\jre\lib\security 目錄下修改java.security文件,修改security.provider.1=sun.security.provider.Sun

改爲security.provider.1=org.bouncycastle.jce.provider.BouncyCastleProvider
 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章