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.
NetBeans IDE 4.2 [200508161800] on jdk 1.5.0_04 After I sucesfully connect to database, I get NPE. After this NPE I do not see the connection in Databases node in Runtime. If the database is so, it can only accept one connection (like Derby in embeded mode), I have to restart NB to try to connect to the database again.
Created attachment 24003 [details] NPE stacktrace
I'm sorry, I can't reproduce. You say "I get" and not "I got" in your report, so I suppose this isn't random. Could you post reproducible steps starting from a fresh userdir, including details such as the database and driver? Thanks. BTW, I commited some changes to the trunk yesterday (Aug 17) in the evening CEST, please test using a recent dev build. Anyway, maybe this isn't really an issue. The NPE seems to come from the progress bar in the Connect dialog, which will be soon replaced with the Progress API (issue #58904).
*** Issue 62439 has been marked as a duplicate of this issue. ***
Here are steps I used to reproduce it on build 200508171800. It is 100% reproducible here (WinXP, jdk 1.5.0_04, Derby 10.1.1.0) 1) start with clean userdir 2) switch to Runtime|Databases and use context menu to add driver 3) add driver file derby.jar (embeded appache derby) and click OK 4) select 'Apache Derby (Embedded)' node and from context menu invoke Connect Using... 5) in the connect dialog write connect string 'jdbc:derby:test;create=true' and click OK => when connection is established, the NPE is thrown
Created attachment 24042 [details] Stacktrace produced by build 200508171800
Likely caused by calling methods on Swing components (probably the progress bar) outside the event thread. The connect dialog now uses the Progress API and I think I solved some threading issues as well. Could you please try to reproduce again?
After rewrite to progress api the connect works fine.