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.
-run IDE on JDK 5 (I have local MySQL installation, if that matters), ie by: ./netbeans --userdir /tmp/52 --jdkhome /space/java/sdk/jdk1.5.0_16/ -J-Dcom.sun.aas.installRoot=/space/java/servers/glassfish -go to services window -expand Databases node => Expected: there will be preregistered connection to Sample db Actual: no javadb connections are preregistered
btw: another steps to reproduce: cd main ant -Dcluster.config=j2ee cd websvc.restkit ant clean test-qa-functional -Dtest.config=stable -Dtest-qa-functional-sys-prop.glassfish.home=/path/to/glassfish first test creates entities from sample DB - if it passes (entities are created) everything is OK, if not then there's something wrong mostly in DB area
Vince, were there any changes in the Glassfish plugin w/respect to sample database creation ?
The code that does the registration doesn't look like it has changed in about 1 year....
Thanks Vince Also, no changes to the Java DB Database support module in the past few weeks. May be caused by changes to the connection nodes?
The code to add a connection is in DerbyDatabases DatabaseConnection dbconn = DatabaseConnection.create(drivers[0], "jdbc:derby://localhost:" + RegisterDerby.getDefault().getPort() + "/" + databaseName, user, schema, password, rememberPassword); // NOI18N If drivers[0] is null then a NullPointerException would occur, so drivers[0] is not null. I'll debug this
Not reproducible when adding Glassfish manually. Sample database connections are added. I tried the example command provided , but this option didn't register Glassfish (at least on Mac) -J-Dcom.sun.aas.installRoot=/Applications/NetBeans/glassfish-v2ur2
Did you run IDE w/ -J-Dcom.sun.aas.... option with clean userdir? It works only for the first start of the IDE.
Yes, I did. Here's the command I ran on Mac: /Users/test/r17/main/nbbuild/netbeans/bin/netbeans --userdir .r3 --jdkhome /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home -J-Dcom.sun.aas.installRoot=/Applications/NetBeans/glassfish-v2ur2
Maybe I need to download the latest Nightly build. When I execute a local build, Glassfish isn't registered
When I use the commandline options to point to Glassfish v2, when NB starts up, Glassfish v3 is registered. Is this the correct option to register Glassfish v2 -J-Dcom.sun.aas.installRoot ? Note that the sample databases are registered if Glassfish v3 is only registered. Marking incomplete since either the command provided is incorrect or there was a misunderstanding that GFv3 plugin registers the sample databases
Actually this appears to be a problem with the command. If I omit the Glassfish installPath then Glassfish v2 and v3 are registered and the sample database connections are registered. /netbeans --userdir ~/.r7 --jdkhome /System/Library/Frameworks/JavaVM.framework/Versions/1.5.0/Home In the automation scripts, try omitting , -J-Dcom.sun.aas.installRoot=/space/java/servers/glassfish
looks like this is linux-only (GF-v2 -v2ur2 and v2.1-b51- are used), I also got rid of local MySQL this time I tried the same on Vista and it works there. The option is correct (at least for win, linux and solaris; I have almost no experience with mac). See also attached screenshot
Created attachment 70315 [details] screenshot
another steps to reproduce are mentioned in #desc2 (or you can use same command as in issue 148211 - only use JDK5 instead of JDK6) btw: I experienced this more then six months ago for the first time but didn't report it as I expected that it's only issue in my shortcut to run the IDE but apparently it isn't, sorry for this
It appears the Java DB path and database location do not get set, only on Linux
It seems the automated test don't really "register" Glassfish, they just set some property. Glassfish is registered by invoking "register(..)" in RegisterPointbase.java (this class resides in the Glassfish module) When register(...) is invoked, Java DB path is set. If Java DB is not set then the sample databases can't be created
The Java DB registered can come from JDK 1.6 or Glassfish. I tried to reproduce this manually, but the sample database was registered.
GF team says "This could also be related to IZ 144222 The 'com.sun.aas.installRoot' should be used for registering GlassFish but does not in certain cases."
144222 has been fixed and verified, so since this issue may be a duplicate, is it also fixed?
yes, seems to be OK now
turned out to be a duplicate of 144222 *** This issue has been marked as a duplicate of 144222 ***