Driver.getConnection使用SQLServer驱动程序和Java 1.6.0_29挂起 [英] Driver.getConnection hangs using SQLServer driver and Java 1.6.0_29

查看:89
本文介绍了Driver.getConnection使用SQLServer驱动程序和Java 1.6.0_29挂起的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道在哪里写这个并决定在这里做。

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

在调试我的程序后,我发现调用Driver。 getConnection(string,string,string)挂起调用线程。为什么(?),我真的不知道,但我发现这种情况发生在java 1.6.0_29而不是java 1.6.0_26。

After loooong time debugging my program I could find out that calling Driver.getConnection(string, string, string) hangs the calling thread. Why(?), I really don't know, but I could find out that this happens with java 1.6.0_29 and not with java 1.6.0_26.

完整的环境:


  • 操作系统:在redhat 6.1和Windows 2008上测试

  • OS: Tested on both redhat 6.1 and Windows 2008

驱动程序:MS SQL Server JDBC驱动程序版本3.0.1301.101

Driver: MS SQL Server JDBC Driver version 3.0.1301.101

Java版本:1.6.0_26和1.6.0_29

Java Versions: 1.6.0_26 and 1.6.0_29

正如我之前所说,它适用于1.6.0_26。

As I previously told it works with 1.6.0_26.

有没有人那样做知道可能导致这种情况的原因是什么?也许有些开发者? :p

Is there anyone that has any idea what's possibly causing this? Maybe some developer? :p

祝你好运,

Rui

推荐答案

我遇到了完全相同的行为:

I encountered exactly the same behaviour:

我在Windows 7 64位PC上同时使用Oracle XE和MS SQL Server Express - 我从1.6.0_27(x64版本)升级到java 1.6.0_29,并且惊讶地看到相同的程序能够连接到Oracle XE但不能连接到MS SQL Server ...

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

我将问题追溯到 javax.sql.DataSource.getConnection()它永远挂起的地方 - 因为这只是一个接口,jdbc驱动程序我怀疑...

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

我正在使用MS SQL Server JDBC驱动程序3.0.1301.202,我甚至更新到SQL Server CTP(社区技术预览) 4.0.1722.1因为我的怀疑是它必须对jdbc驱动程序做一些事情 - 但没有成功:仍然挂起!

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!

我的解决方法是降级到1.6.0_27并且 - 爆炸:一切都很好了!

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

最好的问候
Erich

best regards Erich

这篇关于Driver.getConnection使用SQLServer驱动程序和Java 1.6.0_29挂起的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆