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 233789 - Automatically created Glassfish domain is always named "GF3"
Summary: Automatically created Glassfish domain is always named "GF3"
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.4
Hardware: All All
: P3 normal (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-01 13:57 UTC by Stepan Zebra
Modified: 2013-08-05 17:27 UTC (History)
0 users

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 Stepan Zebra 2013-08-01 13:57:32 UTC
Product Version: NetBeans IDE Dev (Build 201307312300)
Java: 1.7.0_40-ea; Java HotSpot(TM) 64-Bit Server VM 24.0-b55
Runtime: Java(TM) SE Runtime Environment 1.7.0_40-ea-b36
System: Windows 7 version 6.1 running on amd64; Cp1252; en_US (nb)

Following on
http://netbeans.org/bugzilla/show_bug.cgi?id=233049#c11

Glassfish servers automatically registered during NB installation have their development domains created in the NB userdir always under a folder named "GF3", regardless the actual GlassFish version.
The name should be either changed to something universal or it should reflect the real server version.
Comment 1 TomasKraus 2013-08-03 19:01:22 UTC
nb:/users/tomas/WS/nb74> find glassfish.* -name '*.java' \
    -exec grep -Hn 'GF3' {} \;

glassfish.common/src/org/netbeans/modules/glassfish/common/
    GlassFishSettings.java:65:
    private static final String LBL_GF312_WARNING_SHOW_AGAIN
glassfish.common/src/org/netbeans/modules/glassfish/common/
    GlassFishSettings.java:89:
    return settings().getBoolean(LBL_GF312_WARNING_SHOW_AGAIN, true);
glassfish.common/src/org/netbeans/modules/glassfish/common/
    GlassFishSettings.java:98:
    settings().putBoolean(LBL_GF312_WARNING_SHOW_AGAIN, showAgain);
glassfish.common/src/org/netbeans/modules/glassfish/common/wizards/
    AddServerLocationPanel.java:230:
    AddServerLocationPanel.class, "ERR_BrokenGF3_1_2",
    candidate));
glassfish.common/src/org/netbeans/modules/glassfish/common/
    GlassfishInstance.java:1220:
    String foldername = FileUtil
    .findFreeFolderName(FileUtil.getConfigRoot(), "GF3");
glassfish.common/src/org/netbeans/modules/glassfish/common/
    GlassfishInstance.java:1237:
    foldername = FileUtil
    .findFreeFolderName(FileUtil.getConfigRoot(), "GF3");

Looks like the only place where this is being happening is GlassfishInstance#getDomainsRoot().
Comment 2 TomasKraus 2013-08-03 19:40:20 UTC
Domains folder name will be build using all versions number parts (major, minor, update and build). But update and build values are used only when they are not part of zero only sequence.

Folder names for individual GlassFish server versions will be:

 * GF_3.0 for GlassFish 3
 * GF_3.1 for GlassFish 3.1
 * GF_3.0.1 for GlassFish 3.0.1
 * GF_3.1.2.2 for GlassFish 3.1.2.2
 * GF_4.0 for GlassFish 4
 * GF_4.0.1 for GlassFish 4.0.1

Hope this is ok.
Comment 3 TomasKraus 2013-08-03 20:08:49 UTC
Verified with GF 3.1.2.2 and GF 4:
 * registered GF server
 * modified testuserdir/config/GlassFishEE6/Instances/.nbattrs domain parameters to point to directory where user does not have write access
Created directories in testuserdir/config:
 * GF_3.1.2.2 for GF 3.1.2.2
 * GF_4.0 for GF 4

Verified domain startup for GF 4 just to see if it's accessed properly.

Checked into web-main:
----------------------
changeset:   260239:944bc83a4d39
summary:     #233789 - Automatically created Glassfish domain
             is now named after GF version
Comment 4 TomasKraus 2013-08-03 22:36:03 UTC
Pushing changes into web-main, folder name created by plugin is dependent on server version now.
If it did not resolve this problem, then reopen it and assign to installer, maybe there is another code related to GF folders.
Comment 5 Quality Engineering 2013-08-05 02:13:32 UTC
Integrated into 'main-silver', will be available in build *201308042300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/944bc83a4d39
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #233789 - Automatically created Glassfish domain is now named after GF version
Comment 6 TomasKraus 2013-08-05 17:27:17 UTC
Please verify also Bug# 216574 scenario. Jiri Skrivanek was testing it before so he may still remember something about this issue.