The driver cannot establish a secure connection exception resolution by using Secure Sockets Layer (SSL) encryption with SQL Server

Source: Internet
Author: User



The driver cannot establish a secure connection error resolution with SQL Server by using Secure Sockets Layer (SSL) encryption

The following error always occurs when connecting sqlserver2005 with Java

June, 10:05:34 AM Enablessl
Information: path:c:\java\jre6\lib\security
Security providers: [SUN version 1.6, sunrsasign version 1.5, Sunjsse version 1.6, SUNJGSS version 1.0, SUNSASL version 1. 5, XMLDSig version 1.0, SUNPCSC version 1.6]
Sslcontext provider Info:sun JSSE provider (PKCS12, SunX509 key/trust factories, SSLv3, TLSV1)
Sslcontext Provider Services:
Aliases: [1.2.840.113549.1.1, oid.1.2.840.113549.1.1]
Aliases: [1.2.840.113549.1.1, oid.1.2.840.113549.1.1]
Aliases: [1.2.840.113549.1.1.2, oid.1.2.840.113549.1.1.2]
Aliases: [1.2.840.113549.1.1.4, oid.1.2.840.113549.1.1.4]
Aliases: [1.2.840.113549.1.1.5, oid.1.2.840.113549.1.1.5,, oid.]
, SunJSSE:Signature.MD5andSHA1withRSA-Co.ssl.internal.ssl.RSASignature
, SunJSSE:KeyManagerFactory.SunX509-co.ssl.internal.ssl.keymanagerfactoryimpl$sunx509
, SunJSSE:KeyManagerFactory.NewSunX509-co.ssl.internal.ssl.keymanagerfactoryimpl$x509
, SunJSSE:TrustManagerFactory.SunX509-Co.ssl.internal.ssl.trustmanagerfactoryimpl$simplefactory
, SunJSSE:TrustManagerFactory.PKIX-Co.ssl.internal.ssl.trustmanagerfactoryimpl$pkixfactory
Aliases: [Sunpkix, X509,]
, SunJSSE:SSLContext.SSL-Co.ssl.internal.ssl.SSLContextImpl
, SunJSSE:SSLContext.SSLv3-Co.ssl.internal.ssl.SSLContextImpl
, SunJSSE:SSLContext.TLS-Co.ssl.internal.ssl.SSLContextImpl
, SunJSSE:SSLContext.TLSv1-Co.ssl.internal.ssl.SSLContextImpl
, SunJSSE:SSLContext.Default-Co.ssl.internal.ssl.DefaultSSLContextImpl
, SunJSSE:KeyStore.PKCS12-Co.ssl.internal.pkcs12.PKCS12KeyStore
Java.ext.dirs:c:\java\jre6\lib\ext; C:\Windows\Sun\Java\lib\ext The driver cannot establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: "RSA premaster secret Error".
At (
At (
At (
At (
At (
At (
At Java.sql.DriverManager.getConnection (Unknown Source)
At Java.sql.DriverManager.getConnection (Unknown Source)
At Conndb.main (

Online access to information, found that some people say that the problem is the JDBC driver package, but after changing the driver package, the problem remains unresolved.

After I changed my window-〉preference-〉java-〉install jres to Jre6, the problem was solved.

I used the JDK, directory in C:\Program files\java\jdk1.6.0_25, changed to the JRE directory is C:\Program files\java\jre6.

Although I do not know why, but the problem finally solved.

The driver cannot establish a secure connection exception resolution by using Secure Sockets Layer (SSL) encryption with SQL Server

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: