Driver.getConnection hangs using SQLServer driver and Java 1.6.0_29

I encountered exactly the same behaviour:

I use both Oracle XE and MS SQL Server Express on my Windows 7 64bit PC - I upgraded to java 1.6.0_29 from 1.6.0_27 (the x64 version) and was surprised to see that the same programs where able to connect to Oracle XE but not to MS SQL Server...

I traced down the problem to javax.sql.DataSource.getConnection() where it was hanging forever - because this is just an interface, the jdbc drivers raised my suspicion...

I'm using the MS SQL Server JDBC Driver 3.0.1301.202 and I even updated to SQL Server CTP (the "community technical preview") 4.0.1722.1 because my suspicion was that it has to do something with the jdbc driver - but no success: still hanging!

My workaround was to downgrade to 1.6.0_27 and -- bang: everything was fine again!

best regards Erich


Reproduced: Problem occurs with combination of

  • SQL driver 2.0
  • SQL driver 3.0
  • SQL driver 4.0 CTP 3
  • jTDS SQL Driver 1.2.5

  • SQL server 2008R2

  • Java 1.6.0_29

Change either SQL server version (tested on 2005 & 2008) or Java version (1.6.0_27, 1.7.0_1), and the problem doesn't occur anymore.

Client / Server OS: Windows 2008R2

Added to the Java Bug Database and is being worked on by Oracle.

Crossposted on Microsoft MSDN Data Access Forum (accepted answer: upgrade to java 7) and Oracle Java JDBC Forums (information that is added here, is also added to the Java Bug Database).


See the solution here https://forums.oracle.com/forums/thread.jspa?messageID=9954398&tstart=0 http://social.msdn.microsoft.com/Forums/en/sqldataaccess/thread/97dce8fd-6487-4bca-80b0-492167db3e0d

"Apparently, this is related to SSL use and can be mitigated by replacing the jsse.jar in the jre/lib with that from an earlier version, for instance out of the 1.6.0_27 release. I've been confused by 1.6.0_29 working with MS JDBC and older SQL Server '05 setups which are not doing secure connections. All the newer servers (SQL Server '08 R2) fail as they require SSL and Java 1.6.0_29 does not work using jTDS or MS JDBC in this case."


As an FYI, it appears that there's a new step build #30 in the 1.6 family which fixes the issue: http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7103725