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 210747 - GlassFish 3.1.1 incorrectly called 3.1.2 and an exception
Summary: GlassFish 3.1.1 incorrectly called 3.1.2 and an exception
Status: RESOLVED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Vince Kraemer
URL:
Keywords:
: 215368 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-04-05 07:10 UTC by mienamoo
Modified: 2013-10-10 02:20 UTC (History)
6 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Exception (196.18 KB, text/plain)
2012-04-05 07:11 UTC, mienamoo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mienamoo 2012-04-05 07:10:53 UTC
NetBeans build 201204040400
JDK 7u3 32-bit

I have GlassFish 3.1.1 installed and for the moment it is not an option for me to upgrade to the bundled 3.1.2. So I didn't install the bundled GlassFish 3.1.2 with the daily build. And I didn't import settings from NetBeans 7.1.1. Now I have experienced various interesting things which I do think are all related. :)

When expanding the Servers node on the Services panel, the IDE became unresponsive a time or two (with Please Wait... appearing under the servers node). After restarting a few times, now it shows the server with the name "GlassFish Server 3.1.2" but server type "GlassFish Server 3.1". And after this, I get the following exception at times:

org.netbeans.modules.j2ee.deployment.plugins.api.InstanceCreationException: No handlers for [C:\glassfish-3.1.1\glassfish;C:\glassfish-3.1.1\glassfish\domains\domain1]deployer:gfv3ee6wc:localhost:4848
	at org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.addInstanceImpl(ServerRegistry.java:533)
	at org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.addInstanceImpl(ServerRegistry.java:529)
...

The full exception is in the attached text file. :)
Comment 1 mienamoo 2012-04-05 07:11:41 UTC
Created attachment 117861 [details]
Exception
Comment 2 Vince Kraemer 2012-05-17 17:41:57 UTC
how did you register the 3.1.1 instance in the IDE?
Comment 3 mienamoo 2012-05-22 09:29:34 UTC
Mmmm... thinking back more than a month... :)

As far as I can remember, I added it from the Services view using an earlier 7.2 dev build. And the build that I then installed used the same user folder as before.

This is not happening anymore, since about the beginning of May. And it is definitely working as expected with build 201205200400. So some other fix must have influenced this issue.
Comment 4 Vince Kraemer 2012-05-22 15:59:26 UTC
ok.  i will close this as worksforme based on the filers recent update.

Filer: If you run into this again, please feel free to reopen the issue with any additional info about how I can reproduce the issue.  I will take a look at it.
Comment 5 mienamoo 2012-05-23 06:18:20 UTC
That is perfect, thanks!
Comment 6 mienamoo 2012-07-02 12:13:38 UTC
The incorrect label part just happened again (build 201206291011), but happily no exception this time. :)

I had GlassFish 3.1.1 already installed, and I chose to install GlassFish 3.1.2.2 bundled with build 201206291011. I started the IDE with a clean user folder, and chose not to import 7.1.2 settings. (The 7.1.2 was Java SE only anyway.) When the IDE started up, I had two GlassFish servers configured: 

* 3.1.1 with a server name of "GlassFish Server 3.1.2" and server type "GlassFish Server 3.1"
* 3.1.2.2 with a server name of "GlassFish Server 3.1.2 1" and server type "GlassFish Server 3.1"

I cleaned out the user folder and tried again - I can reliably reproduce this.

If I remove the 3.1.1 server and add it manually again, the name becomes "GlassFish Server 3+", which is more accurate.

However, I am not able to re-add the GlassFish 3.1.2.2 - I get the error "Not a valid GlassFish Server installation".
Comment 7 Petr Hejl 2012-07-02 12:20:21 UTC
(In reply to comment #6)
> The incorrect label part just happened again (build 201206291011), but happily
> no exception this time. :)
> 
> I had GlassFish 3.1.1 already installed, and I chose to install GlassFish
> 3.1.2.2 bundled with build 201206291011. I started the IDE with a clean user
> folder, and chose not to import 7.1.2 settings. (The 7.1.2 was Java SE only
> anyway.) When the IDE started up, I had two GlassFish servers configured: 
> 
> * 3.1.1 with a server name of "GlassFish Server 3.1.2" and server type
> "GlassFish Server 3.1"
> * 3.1.2.2 with a server name of "GlassFish Server 3.1.2 1" and server type
> "GlassFish Server 3.1"
> 
> I cleaned out the user folder and tried again - I can reliably reproduce this.
> 
> If I remove the 3.1.1 server and add it manually again, the name becomes
> "GlassFish Server 3+", which is more accurate.
> 
> However, I am not able to re-add the GlassFish 3.1.2.2 - I get the error "Not a
> valid GlassFish Server installation".

If I understand the issue correctly in first part you are talking about the UI visible names assigned by installer while the second part id duplicate of isssue #215061. Right?
Comment 8 mienamoo 2012-07-02 12:23:32 UTC
(In reply to comment #7)
> If I understand the issue correctly in first part you are talking about the UI
> visible names assigned by installer while the second part id duplicate of
> isssue #215061. Right?

That is indeed correct.
Comment 9 Petr Hejl 2012-07-02 12:28:06 UTC
Jirko, not sure where the installer part of the issue belongs or its priority... Leaving it up to you.
Comment 10 Jiri Rechtacek 2012-07-10 15:41:00 UTC
(In reply to comment #9)
> Jirko, not sure where the installer part of the issue belongs or its
> priority... Leaving it up to you.

After my investigation I think the problem is in glassfish.common/AutomaticRegistration. By the contract between installer/gf, described in http://wiki.netbeans.org/NetBeansInstallerIDEAndRuntimesIntegration - a registration is called several times for each available GF. For that reason display name of GF server in IDE shouldn't be static but has to be dynamically read from specific GF installation.
Comment 11 Jiri Rechtacek 2012-07-10 16:12:29 UTC
*** Bug 215368 has been marked as a duplicate of this bug. ***
Comment 12 TomasKraus 2012-09-14 13:39:32 UTC
AutomaticRegistration class may need some significant changes.

Version detection based on "lib/dtds/glassfish-web-app_3_0-1.dtd" should be replaced by GF Tooling SDK method
org.glassfish.tools.ide.utils.ServerUtils.getServerVersion()
which gets full version number from com.sun.appserv.server.util.Version class in modules/common-util.jar

Display name attribute should be build based on this real version number or .nbattrs file object should be used.
Comment 13 TomasKraus 2013-07-19 23:21:11 UTC
There is no time to rewrite AutomaticRegistration in 7.4. Postponing for next release.
Comment 14 TomasKraus 2013-09-24 11:39:44 UTC
Checked into web-main:
----------------------
changeset:   263878:0f3604f97c97
summary:     #210747 - Fixed server version detection in AutomaticRegistration code

changeset:   263879:bbc4bbc3f403
summary:     #210747 - GlassFish AutomaticRegistration classpath update in installer
Comment 15 TomasKraus 2013-09-24 12:28:40 UTC
Pushed in, closing this bug.

Real version numbers will be used to register GlassFish server now.
Comment 16 TomasKraus 2013-10-02 13:11:09 UTC
Checked into web-main:
----------------------
changeset:   264501:858cca13796f
summary:     #210747 - System.out.println removed
Comment 17 Quality Engineering 2013-10-10 02:20:55 UTC
Integrated into 'main-silver', will be available in build *201310100001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/858cca13796f
User: Tomas Kraus <TomasKraus@netbeans.org>
Log: #210747 - System.out.println removed