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 250768 - New database added to Java DB may fail to show in Services Window
Summary: New database added to Java DB may fail to show in Services Window
Status: VERIFIED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Derby (show other bugs)
Version: 8.1
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-02-27 13:57 UTC by MackSix
Modified: 2015-03-04 08:54 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MackSix 2015-02-27 13:57:26 UTC
I see this with NetBeans 8.0.2, but it's not as frequent as with a new installation of Dev Build 201502270001.

1. Delete .netbeans-derby directory to that new one is created.
2. Start NetBeans.
3. Right click on Java DB node in Services Window and choose to create a new database.
4. Name database test001, username: appuser, password: apppw.
5. Click OK.

Results: Database is created, but a new node under Java DB may not appear in services window. Keep repeating steps 3 through 5, increment the number in the database name. Every other time, a node will appear along with any others that did not appear before.

Workaround: If the node does not appear, restart NetBeans and node will then show.

Product Version: NetBeans IDE Dev (Build 201502270001)
Java: 1.8.0_31; Java HotSpot(TM) 64-Bit Server VM 25.31-b07
Runtime: Java(TM) SE Runtime Environment 1.8.0_31-b13
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)
Comment 1 matthias42 2015-03-02 20:58:49 UTC
I could reproduce this (thank you for the very good description!). I committed a fix as:

http://hg.netbeans.org/core-main/rev/acd452c2d8d9

this looks like a caching issue, so the fix was to force a refresh of the filesystem, that contains the derby directory. While the process for creating a derby database is still slow, it showed the new nodes reliably.

Please verify the nighly build when it is generated, whether this fixes it also on your side. Thank you!
Comment 2 Quality Engineering 2015-03-04 03:56:54 UTC
Integrated into 'main-silver', will be available in build *201503040001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/acd452c2d8d9
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #250768: Force filesystem refresh after derby database creation to make detection reliable + Fix unittests
Comment 3 MackSix 2015-03-04 08:54:33 UTC
Works great. V.

Product Version: NetBeans IDE Dev (Build 201503040001)
Java: 1.8.0_31; Java HotSpot(TM) 64-Bit Server VM 25.31-b07
Runtime: Java(TM) SE Runtime Environment 1.8.0_31-b13
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)