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 256423 - java.io.IOException: Directory for sample database already exists and is not empty: 'C:\Users\jyeary\.netbeans-derby\sample'
Summary: java.io.IOException: Directory for sample database already exists and is not ...
Status: RESOLVED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Derby (show other bugs)
Version: 8.1
Hardware: All All
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-06 20:19 UTC by jyeary
Modified: 2015-12-06 02:31 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter: 220492


Attachments
stacktrace (1.37 KB, text/plain)
2015-11-06 20:19 UTC, jyeary
Details
stacktrace (1.37 KB, text/plain)
2015-11-18 21:56 UTC, Exceptions Reporter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jyeary 2015-11-06 20:19:35 UTC
Build: NetBeans IDE 8.1 (Build 201510222201)
VM: Java HotSpot(TM) 64-Bit Server VM, 25.66-b17, Java(TM) SE Runtime Environment, 1.8.0_66-b17
OS: Windows 7

User Comments:
GUEST: Creating a web application immediately after installing 8.1rc windows

jyeary: Attempting to connect to a derby database.

GUEST: Ap
Comment 1 jyeary 2015-11-06 20:19:36 UTC
Created attachment 157197 [details]
stacktrace
Comment 2 Exceptions Reporter 2015-11-18 21:56:52 UTC
Created attachment 157398 [details]
stacktrace

I was opening a new project and selected Java EE. Then after it activated and opened I saw this error.
Comment 3 matthias42 2015-11-25 20:35:59 UTC
The exception you are seeing is caused when the sample db can't be created. There are two valid states:

a) The sample derby db already exists and is valid
b) The target directory for the DB is either empty or does not yet exist

In your case the third state is reached: the directory exists but is not empty.

Could you please take a look at the referenced directories and list the contents?

C:\Users\jyeary\.netbeans-derby\sample

and

C:\Users\mbutler\.netbeans-derby\sample

There might be some garbage from an old db - I'm thinking about adding a dialog to ask the user what to do in this case, but before I'd like to know what makes the code stumble. Thanks for your help!
Comment 4 terje7601 2015-11-26 07:09:24 UTC
In my case it occurred when starting to use 8.1 (before that, I had been using its "dev" builds for months already). After this exception came up, I simply deleted the folder (partly because of this error, partly because I hate seeing directories like that in my user directory (cf. bug 207507)), so I can't help.
Comment 5 matthias42 2015-12-04 21:16:09 UTC
Thanks for replying terj7601, I decided to go ahead with the fix (to be frank the error is only logged and not reported anymore - this brings it in-line with 8.0).

The fix was pushed as:

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

If anybody can reproduce the problem with 8.1 please check when a nighly is build that contains this fix and mark this bug as VERIFIED.
Comment 6 Quality Engineering 2015-12-06 02:31:17 UTC
Integrated into 'main-silver', will be available in build *201512060002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/e8911c5e8884
User: Matthias Blaesing <matthias42@netbeans.org>
Log: #256423: Do not report exception error when sample database can't be created and just log to ide log