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 257948 - Cannot start Java DB in NetBeans
Summary: Cannot start Java DB in NetBeans
Status: VERIFIED INVALID
Alias: None
Product: db
Classification: Unclassified
Component: Derby (show other bugs)
Version: 8.1
Hardware: PC Windows 7 x64
: P3 normal (vote)
Assignee: matthias42
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-02-11 16:27 UTC by jsvelta
Modified: 2016-02-12 09:25 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
log file (67.98 KB, application/octet-stream)
2016-02-11 20:19 UTC, jsvelta
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jsvelta 2016-02-11 16:27:37 UTC
After I updated jdk I cannot start Java DB form NetBeans. NetBeans is trying and traying and traying to start it, but never ends. 


jdk x64 version: 1.8.0_74 

NetBeans IDE 8.1 (Build 201510222201)

1. Open Services window
2. Expand Databases tree
3. Select Java DB
4. Open context menu and select Start Server command

Expected behavior: Java DB server starts

Start of glassfish server also do not starts Java DB server.
Comment 1 matthias42 2016-02-11 19:35:59 UTC
I think you seen "normal" behavior (this is nice speak to say I most probably will turn this into an enhancement request):

Please check the JavaDB settings:

1. Open Services tab
2. Expand Databases
3. Select Java DB
4. Open Context Menu
5. Choose properties
6. Change Java DB Installation to the new location in the new JDK folder 
   (normally you'll have to replace the minor version in my case 66->74)
7. Start JavaDB

(Btw. in my test in step 4 - only Properties is even selectable)

Does this work for you?

My assumption:

When no db properties are present on first use the properties are populated by scanning the most probably locations for javadb and the installed DBs. This is persisted and when you upgraded your JDK you removed the JavaDB that was configured in netbeans.

The enhancement would then be, to scan for an alternate location if the configure location fails.
Comment 2 jsvelta 2016-02-11 20:02:24 UTC
Properties are correctly set to new location
Comment 3 matthias42 2016-02-11 20:06:14 UTC
To be be clear:

1. Please double check that the path is really correct there
2. Please attach message.log to this bug from a session where you tried to start java db (http://wiki.netbeans.org/FaqLogMessagesFile)
3. Are the start/stop options available and selectable in the context menu?
Comment 4 jsvelta 2016-02-11 20:18:29 UTC
Paths are correct. I choosed them from dialog window.

I attached my messages.log
Comment 5 jsvelta 2016-02-11 20:19:32 UTC
Created attachment 158467 [details]
log file
Comment 6 jsvelta 2016-02-11 20:24:41 UTC
Start option is available and selectable in the context menu.
Stop option is not selectable.
Comment 7 matthias42 2016-02-11 20:53:48 UTC
Thank you for checking - this looks ok so far. Please check

1. Do you get an output tab when you try to start javadb? If so, please paste output heere
2. Please try to start javadb manually:
   a) Open a command prompt
   b) Run: 
   java -cp "<JAVA_DB_PATH>\lib\derby.jar;<JAVA_DB_PATH>\lib\derbytools.jar;<JAVA_DB_PATH>\lib\derbynet.jar" -Dderby.system.home=<DB_LOCATION> org.apache.derby.drda.NetworkServerControl start
   
   JAVA_DB_PATH is to be taken from the "Jaav DB Properties" Dialog (Java DB Installation)
   DB_LOCATION is from same dialog, second parameter

   c) Please copy the output of that incarnation here
Comment 8 jsvelta 2016-02-11 21:19:13 UTC
May command: java -cp "C:\Program Files\Java\jdk1.8.0_74\db\lib\derby.jar;C:\Program Files\Java\jdk1.8.0_74\db\lib\derbytools.jar;C:\Program Files\Java\jdk1.8.0_74\db\lib\derbynet.jar" -Dderby.system.home=D:\Users\jsvelta\.netbeans-derby org.apache.derby.drda.NetworkServerControl start


There is no output in stdout nor in stderr
Comment 9 jsvelta 2016-02-11 22:34:37 UTC
There is problem with cs locale.

When I set DERBY_OPTS=-Duser.language=en it starts from command line.

It is possible to set DERBY_OPTD in netbeans?
Comment 10 jsvelta 2016-02-11 22:49:36 UTC
see https://issues.apache.org/jira/browse/DERBY-6828
Comment 11 Jiri Kovalsky 2016-02-12 09:25:58 UTC
It is not possible to set system properties in NetBeans but there is a way how to set it programmatically:

http://wiki.netbeans.org/FaqSysPropsDuringRun

There is also a plugin which displays system properties in the IDE:

http://plugins.netbeans.org/plugin/59068/netbeans-system-properties

Verifying as invalid issue. Thanks for your update.