Driver.getConnection hangs using SQLServer driver and Java 1.6.0_29

前端 未结 9 1168
失恋的感觉
失恋的感觉 2020-11-28 12:28

I didn\'t know where to write something about this and decided to do it here.

After loooong time debugging my program I could find out that calling Driver.getConnect

相关标签:
9条回答
  • 2020-11-28 13:04

    Same problem here (SQLJDBC4, MsSQL 2008 R2, JDK1.6.0.29), but after updating to 1.6.0.30 problem was solved...

    So it should be a critical bug in the DriverManager of 1.6.0.29

    0 讨论(0)
  • 2020-11-28 13:06

    Upgrading to 1.6.0_30 also worked for me. Microsoft has released a statement announcing the fix in 2012 Q1. It looks like it's a Java vulnerability (BEAST).

    0 讨论(0)
  • 2020-11-28 13:10

    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

    0 讨论(0)
  • 2020-11-28 13:12

    I had the exact same issue where jBoss would hang on driver.getConnection(). However, I was using jBoss EAP 5.1, java 1.6.0_37x64, Sql Server 2005, and jtds1.2.5 as my jdbc driver.

    The work around I had to use was a jvm setting at startup: -Djsse.enableCBCProtection=false and that resolved it.

    I don't consider this a fix, but rather a work-around at this point.

    I did find a bug: 7105007 : Microsoft & jTDS JDBC driver broken after update to 1.6.0_29 that was very similar, but had a different cause. What was interesting was that it showed up on both the MS drivers and jtds drivers.

    0 讨论(0)
  • 2020-11-28 13:13

    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).

    0 讨论(0)
  • 2020-11-28 13:13

    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

    0 讨论(0)
提交回复
热议问题