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.

Bug 62513 - NPE thrown, when connection to database established
Summary: NPE thrown, when connection to database established
Status: RESOLVED WORKSFORME
Alias: None
Product: db
Classification: Unclassified
Component: Code (show other bugs)
Version: 5.x
Hardware: All All
: P2 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
: 62439 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-08-17 17:21 UTC by _ lcincura
Modified: 2005-09-09 11:44 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
NPE stacktrace (4.87 KB, text/plain)
2005-08-17 17:22 UTC, _ lcincura
Details
Stacktrace produced by build 200508171800 (4.53 KB, text/plain)
2005-08-18 14:31 UTC, _ lcincura
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ lcincura 2005-08-17 17:21:29 UTC
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.
Comment 1 _ lcincura 2005-08-17 17:22:56 UTC
Created attachment 24003 [details]
NPE stacktrace
Comment 2 Andrei Badea 2005-08-18 09:00:33 UTC
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).
Comment 3 Andrei Badea 2005-08-18 09:36:13 UTC
*** Issue 62439 has been marked as a duplicate of this issue. ***
Comment 4 _ lcincura 2005-08-18 09:46:36 UTC
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
Comment 5 _ lcincura 2005-08-18 14:31:19 UTC
Created attachment 24042 [details]
Stacktrace produced by build 200508171800
Comment 6 Andrei Badea 2005-09-06 16:00:27 UTC
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?
Comment 7 _ lcincura 2005-09-09 10:02:30 UTC
After rewrite to progress api the connect works fine.