File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Secure Sockets Layer (SSL) encryption Error : MSSQL SERVER 2008 Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Databases » JDBC
Reply Bookmark "Secure Sockets Layer (SSL) encryption Error : MSSQL SERVER 2008" Watch "Secure Sockets Layer (SSL) encryption Error : MSSQL SERVER 2008" New topic
Author

Secure Sockets Layer (SSL) encryption Error : MSSQL SERVER 2008

Abhishekshri Shrivastava
Ranch Hand

Joined: Jan 13, 2011
Posts: 31
Hi,

I am working on a web spring application. I have a databasex.xml file. I am trying to connect to a MSSQL SEVER 2008. I am getting following error:-->

The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: class configured for SSLContext: com.sun.net.ssl.internal.ssl.SSLContextImpl not a SSLContext.

I am using
1. sqljdbc4.jar
2. JRE 1.6.0_31
3. JBOSS 6.1

The DB source bean as following:

I have also checked the /jre/lib/security configuration. even jsse.jar is in my buildpath.It's fine.
Please suggest me the solution.
Martin Vajsar
Bartender

Joined: Aug 22, 2010
Posts: 2328
    
    2

Would this page be of any help? (I don't have any experience in the area, this just came out first from my search.)
Abhishekshri Shrivastava
Ranch Hand

Joined: Jan 13, 2011
Posts: 31
Martin Vajsar wrote:Would this page be of any help? (I don't have any experience in the area, this just came out first from my search.)



I tried by changing connection properties in url but it didn't work.

yes.. if I make encrypt=true; then get something different eror here as

Servlet.service() for servlet spring threw exception: com.microsoft.sqlserver.jdbc.SQLServerException: The driver could not establish a secure connection to SQL Server by using Secure Sockets Layer (SSL) encryption. Error: class configured for TrustManagerFactory: com.sun.net.ssl.internal.ssl.TrustManagerFactoryImpl$PKIXFactory not a TrustManagerFactory.
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1509) [:]



even i tried by chnaging jre versions (as got somewhere that jdbc 4 ; jre 1.6.0_29 / 30 doesn't work properly for MS SQL connections.
even that didn't work.

The starnge thing is that --> if I make a jdbc connection in java console apps it works fine but doesn't work in a web application.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Secure Sockets Layer (SSL) encryption Error : MSSQL SERVER 2008
 
Similar Threads
HibernateDaoSupport and Transaction
Spring 2.5 with Hibernate 3.0 error when creating dataSource for Hibernate SessionFactory
SQLGrammarException using Hibernate + Embedded Derby
Spring And Hibernate (LocalSessionFactoryBean)
Connection pool