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 98562 - VisualWebPack: Nondefault name of Glassfish directory causes wrong path for DB location
Summary: VisualWebPack: Nondefault name of Glassfish directory causes wrong path for D...
Status: CLOSED FIXED
Alias: None
Product: db
Classification: Unclassified
Component: Derby (show other bugs)
Version: 6.x
Hardware: PC All
: P2 blocker (vote)
Assignee: Andrei Badea
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-21 20:03 UTC by _ alexpetrov
Modified: 2007-04-25 16:31 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Log for installation (751.47 KB, text/plain)
2007-03-22 12:46 UTC, _ alexpetrov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ alexpetrov 2007-03-21 20:03:53 UTC
Set for installation: NB 6.0 + VisualWebPack + Glassfish v2 b38.

Problem for VisualWebPack - Property "Java DB Location" gets incorrect value:
if nondefault name of Glassfish directory for Glassfish installation path is
used (for example, on WinXP "glassfish" instead of "glassfish-v2-b38"), a
correct path for Glassfish databases will be changed to an incorrect JAVA_HOME
path (for example, on WinXP wrong path "C:\Petrov\j2sdk1.6.0\db" is used instead
of correct path "C:\glassfish\javadb").
Comment 1 dlipin 2007-03-21 22:06:01 UTC
pal127,

Could you please attach installation log file? 
It is located at ~/.nbi/log (smth like "C:\Documents and 
Settings\<User>\.nbi\log\20070215001056.log").
Comment 2 dlipin 2007-03-22 09:28:59 UTC
Well...

I guess you are speaking about NetBeans and Runtimes->Drivers->Java DB 
(Embedded)

Am I right?

In that case I can say that I`m not sure that it is NBI issue. I do think that 
it NetBeans issue of getting Database or, that is more probably, it is made by 
design.
I`ve done the similar installation with using JDK5 and not JDK6 (both for 
NetBeans and GlassFish). 
The result is that proper JavaDB location is set for Java DB (Embedded). It 
points to GlassFish`s javadb subdir. I guess that it is set correctly because 
JavaDB is not embedded in JDK5.

I`ve also tried to install Application Server (actually, 9.1 b40) with using 
JDK6, removed ~/.netbeans/dev, after NetBeans started I`ve manually added 
AppServer instance. After NetBeans restart I see that Java DB (Embedded), 
again, points to JDK`s derby not to the AppServer one.

So.. in conclusion. I do think that JDK`s jars are loaded first so in case of 
JDK6 NetBeans gets jdk`s JavaDB first and then skip GlassFish`s one. In case of 
JDK5 the only JavaDB driver is get from GF. And that is what you need.

I`m reassinging for db component for the further work and raising the priority 
for (I hope) more quick evaluation.
Comment 3 _ alexpetrov 2007-03-22 12:46:24 UTC
Created attachment 39810 [details]
Log for installation
Comment 4 _ alexpetrov 2007-03-22 12:50:59 UTC
Yes, dlipin, I think your explanation of this bug reason is absolutely right.
I've attached an installation log-file (j2sdk1.6.0 was used).
Comment 5 Andrei Badea 2007-03-23 15:18:44 UTC
I can reproduce. Back to P2, since the user impact is low. Also note that more
quick evaluation is not a reason for increasing the priority.
Comment 6 Andrei Badea 2007-03-23 18:18:40 UTC
Thanks for the time spent on evaluating this.

The behavior is almost as designed. On JDK 1.6 the Java DB instance bundled with
JDK should be registered instead of the one bundled with GlassFish. I made some
changes to ensure that this is always true.

Checking in nbproject/project.xml;
/cvs/db/derby/nbproject/project.xml,v  <--  project.xml
new revision: 1.14; previous revision: 1.13
done
Checking in src/org/netbeans/modules/derby/DerbyOptions.java;
/cvs/db/derby/src/org/netbeans/modules/derby/DerbyOptions.java,v  <-- 
DerbyOptions.java
new revision: 1.14; previous revision: 1.13
done
Checking in src/org/netbeans/modules/derby/Installer.java;
/cvs/db/derby/src/org/netbeans/modules/derby/Installer.java,v  <--  Installer.java
new revision: 1.4; previous revision: 1.3
done
RCS file: /cvs/db/derby/src/org/netbeans/modules/derby/JDKDerbyHelper.java,v
done
Checking in src/org/netbeans/modules/derby/JDKDerbyHelper.java;
/cvs/db/derby/src/org/netbeans/modules/derby/JDKDerbyHelper.java,v  <-- 
JDKDerbyHelper.java
initial revision: 1.1
done
Checking in src/org/netbeans/modules/derby/spi/support/DerbySupport.java;
/cvs/db/derby/src/org/netbeans/modules/derby/spi/support/DerbySupport.java,v 
<--  DerbySupport.java
new revision: 1.12; previous revision: 1.11
done
Comment 7 _ alexpetrov 2007-04-25 16:30:54 UTC
Verified - not reproduced on NB 6.0 M9 build #070425000
Comment 8 _ alexpetrov 2007-04-25 16:31:38 UTC
Verified - not reproduced on NB 6.0 M9 build #070425000