This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
System Info: Product Version = NetBeans IDE 6.0 RC1 (Build 200711111200) Operating System = Windows 2000 version 5.0 running on x86 Java; VM; Vendor = 1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05; Sun Microsystems Inc. Java Home = D:\jdk1.6.0_03\jre System Locale; Encoding = zh_CN (nb); GBK Home Directory = C:\Documents and Settings\Administrator Current Directory = D:\NetBeans6.0RC1 1. Run NetBeans IDE 6.0 rc1(or 6.0beta2) 2. Open a existing web project which using a data source(with oracle jdbc driver v9.2 in tomcat v6.0.14), a warning dialoag box show: "One or more projects use database connection that have not been registered. Right-click the project in the projects window and choose Relolve Data Source Problem to help register database connections." 3. Right-click the project in the projects window and choose "Relolve Data Source Problem...", and then click the button "Add connection..." in the dialog box with title "Resolve Data Sources". 4. In the dialog box "New DataBase Connection", click "New Driver..." at the list menu of "Name". Add the (Oracle jdbc) driver file "E:\fcas\web\WEB-INF\lib\ojdbc14.jar". and then click "OK" 5. Now, just a few seconds later, the IDE is deadlock. You can't do anything, except killing the IDE's process in Windoz Task Manager. 6. After kill the IDE, and then rerun it, the data source problem is disappear, it has been resolved. Chinese: 系统信息: 产品版本:NetBeans IDE 6.0 RC1 (Build 200711111200) 操作系统:Windows 2000 version 5.0 running on x86 Java虚拟机; 供应商:1.6.0_03; Java HotSpot(TM) Client VM 1.6.0_03-b05; Sun Microsystems Inc. JDK安装目录:D:\jdk1.6.0_03\jre 系统地区与编码:zh_CN (nb); GBK 用户目录:C:\Documents and Settings\Administrator IDE安装目录:D:\NetBeans6.0RC1 1. 启动NetBeans IDE 6.0 rc1(或6.0beta2) 2. 打开一个已经存在的使用了数据源(data source)的web项目(该项目在Tomcat 6.0.14中使用了Oracle 9.2的JDBC驱动程序),会弹出 一个警告窗口,内容为: “一个或多个项目使用了未注册的数据库连接。在项目窗口的项目节点点击鼠标右键,并选择解决数据源问题,以帮助解决数据库连接。” 3. 在项目窗口的项目节点点击鼠标右键,并选择“解决数据源问题...”,再在标题为“解决数据源”的对话框中点击“添加连接...”按钮," 4. 在“新的数据库连接”对话框中,在名称的下拉菜单里点选“新的驱动...”,添加(Oracle的JDBC)驱动程序文件“E:\fcas\web\WEB-INF \lib\ojdbc14.jar”。并点击“确定”。 5. 现在,仅几秒之后,整个IDE死锁了,你什么都做不了,只能在Windoz的任务管理中杀死IDE的进程。 6. 杀死IDE后,再次运行它,此时数据源问题消失了,它已经被解决完了。
Created attachment 52857 [details] the messages log file of 6.0rc1
Created attachment 52858 [details] deadlock_when_ResolveDataSources_1.png
Created attachment 52859 [details] deadlock_when_ResolveDataSources_2.png
Created attachment 52860 [details] deadlock_when_ResolveDataSources_3.png
Created attachment 52861 [details] deadlock_when_ResolveDataSources_4.png
Looks like the problem is in the db api. Can you provide thread dump (To generate a stack trace on Windows 95, or Windows NT platforms, enter the key sequence <ctrl><break> in the window where the Java program is running, or click the Close button on the window.)?
When exactly the deadlock occurs. When click ok in add driver dialog or when you click ok in new connection dialog?
The dialog box "New JDBC Driver" is good, I can click "OK" button in it(deadlock_when_ResolveDataSources_3.png). Then dialog box "New JDBC Driver" is closed correctly, and the focus return on the dialog box "New Database Connection"(deadlock_when_ResolveDataSources_4.png). In the dialog box "New Database Connection", the three buttons(OK/Cancel/Help) can't handle any key event and can't handle any mouse click event. The deadlock occurs! The same say, I can't close the dialog box "New Database Connection" after set a new driver, and I can't use the IDE anymore.
Can you provide the thread dump mentioned in desc7?
*** Issue 122315 has been marked as a duplicate of this issue. ***
Seems to be related to resolving missing oracle connection.
p2 according to priority guideline
Hi, John. I know this is in the DB area, but it appears to be closely related to the work you did on resolving data sources. Do you want to take this? It doesn't need to be fixed in 6.0, but it's a P2 for the 6.1. Thanks!
Get "lucky" with reproducing. Please never use swing components outside of the event dispatch thread (as described here: http://java.sun.com/docs/books/tutorial/uiswing/concurrency/dispatch.html), unless it is explicitly allowed in javadoc. There is manipulation with JButton in a helper thread causing the deadlock. Attaching thread dump.
Created attachment 53748 [details] thread dump
I'll work on this next week It looks like the button action handler code is run outside the EDT
the bug is the jButton is reset in a RequestProcessor thread instead of EDB. Fix is available. Listen for list data model changes then in EDT, if list is empty reset the button
Fixed in the trunk Checking in j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java,v <-- MissingDatabaseConnectionWarning new revision: 1.8; previous revision: 1.7 done
Small mistake in last integration. If data source is removed then the list should be checked if empty, not if data source is added Checking in j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java,v <-- MissingDatabaseConnectionWarning new revision: 1.9; previous revision: 1.8 done
will provide a better fix
improved the fix, also found a problem in the fireContentsChanged call Checking in j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java,v <-- MissingDatabaseConnectionWarning.java new revision: 1.11; previous revision: 1.10 done
No need to use weak listener. The listener will be GC'd when the panel closes Checking in j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/MissingDatabaseConnectionWarning.java,v <-- MissingDatabaseConnectionWarning.java new revision: 1.12; previous revision: 1.11 done
*** Issue 125530 has been marked as a duplicate of this issue. ***
Reporter, can you please verify the fix in the latest daily build?
The bug has been fixed,so close this issue. ========== Product Version: NetBeans IDE 6.0 (Build 200711261600) Test result: deadlock Product Version: NetBeans IDE 6.1 Dev (Build 200801030000) Test result: work fine Product Version: NetBeans IDE 6.1 Dev (Build 200801220000) Test result: work fine Product Version: NetBeans IDE 6.0.1 ml Dev (Build 200801190000 Simplified Chinese) Test result: deadlock Product Version: NetBeans IDE 6.0.1 ml Dev (Build 200801061200 Simplified Chinese) Test result: deadlock ========== Chinese: 缺陷已修正,因此关闭此事件。 产品版本:NetBeans IDE 6.0 (Build 200711261600) 测试结果:死锁 产品版本:NetBeans IDE 6.1 Dev (Build 200801030000) 测试结果:工作正常 产品版本:NetBeans IDE 6.1 Dev (Build 200801220000) 测试结果:工作正常 产品版本:NetBeans IDE 6.0.1 ml Dev (Build 200801190000 简体中文版) 测试结果:死锁 产品版本:NetBeans IDE 6.0.1 ml Dev (Build 200801061200 简体中文版) 测试结果:死锁
The reporter has tested the fix on 6.1 dev trunk (1/3 and 1/22/08) therefore marking verified so fix can be merged into next 6.0.1 patch candidate
Mark the bug as verified
Shouldn't be reopened just to mark verified.
Reporter has verified.
The fix has been ported into the release601_fixes branch. Checking in MissingDatabaseConnectionWarning.java; /cvs/j2ee/utilities/src/org/netbeans/modules/j2ee/common/ui/Attic/MissingDatabaseConnectionWarning.java,v <-- MissingDatabaseConnectionWarning.java new revision: 1.7.8.1; previous revision: 1.7 done