JDBC connection to SQL Server 2008 hangs because of JDK 1.6 u29

Normally I use MySQL on Mac OS X for developing our timr tracking application timr.com, but some enterprise customers are using it with SQL Server so I have to test it on that database to.

Last week I took it for another spin and found that I was not able to connect to the SQL Server 2008 running in my VMWare fusion machine anymore. I could see that there was a process at the SQL server for the connection but no data went through. After blaming Windows firewall and SQL Server TCP/port settings if found this discussion on stackoverflow.com.

As it turns out this was caused by an issue introduced with the Java 1.6 u29 as described in this bug report. The SQL server connection uses encryption and something was changed in this area by the Java update.

Running java -version in the command line showed that I had exactlty that version on my system. No wonder – it came on 2011/11/11 with Java for Mac OS X 10.7 Update 1

A workaround is to replace the jsse.jar in the jre/lib folder of the JDK with a version from an older JDK.

Leave a Reply