Please use the Apache issue tracking system for new NetBeans issues ( !!
Bug 203816 - Automatically registered GlassFish server not visible in IDE until Servers node expanded
Automatically registered GlassFish server not visible in IDE until Servers no...
Product: serverplugins
Classification: Unclassified
Component: Infrastructure
All All
: P1 (vote)
: 7.1
Assigned To: Petr Hejl
Depends on:
  Show dependency treegraph
Reported: 2011-10-17 10:24 UTC by Jiri Skrivanek
Modified: 2011-10-21 11:41 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT

Ant script for GlassFish automatic registration. (1.49 KB, text/plain)
2011-10-17 10:24 UTC, Jiri Skrivanek
revert part of fix for 200049 (944 bytes, text/plain)
2011-10-17 17:54 UTC, Vince Kraemer

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Skrivanek 2011-10-17 10:24:31 UTC
Created attachment 112121 [details]
Ant script for GlassFish automatic registration.

It started to happen in recent daily builds that automatically registered GlassFish server is not visible in IDE until the Servers node is expanded. It breaks all JavaEE automated tests. Maybe it is not a problem in serverplugins but something in platform has been changed. I hope you can evaluate what is the trigger which makes registered server visible and you can then reassign to responsible developer. To reproduce:

- copy attached testGlassFish.xml to root of your NetBeans Hg repository (e.g. C:\hg\web-main)
- build NetBeans
- register GlassFish using
    ant -f testGlassFish.xml -Dglassfish.home="C:\Program Files\glassfish-3.1.1"
- check C:\hg\web-main\nbbuild\netbeans\enterprise\config\GlassFishEE6WC was created
- run IDE
    ant tryme
- try to create web project but no server is offered
- look at C:\hg\web-main\nbbuild\testuserdir\config. There are missing folders required in order the server instance is recognized in IDE.
- go back to IDE
- open Window|Services
- expand Servers node. GlassFish instance is present and after that folders were added to C:\hg\web-main\nbbuild\testuserdir\config and instance is visible in new project wizard as well.
Comment 1 Vince Kraemer 2011-10-17 16:42:29 UTC
how recent? days? weeks?
Comment 2 Vince Kraemer 2011-10-17 17:54:15 UTC
Created attachment 112144 [details]
revert part of fix for 200049
Comment 3 Vince Kraemer 2011-10-17 17:55:46 UTC
I was able to replicate this on Solaris, too.

it looks like this issue is caused by


To test this, I 'reverted' the last changes in the file (see attached diff) and reran the test.

I was able to successfully create a web app project that targets GF without exploring through the Services explorer.
Comment 4 Petr Hejl 2011-10-18 13:09:19 UTC
I guess I need more details.

First I updated to db8cc73303bc which is parent of reported regression changeset. So the thing should work.

1) ant clean && ant build-nozip
2) created testGlassFish.xml
3) invoked ant -f testGlassFish.xml -Dglassfish.home=/glassfish/home
4) config files are in place, for some reason GF instance is named GlassFish V3 Prelude
5) ant tryme
6) obviously ergonomics is in place
7) click New Web Project - ergonomics enabling Java EE
8) no GF available in second step
9) I opened services view - GF is under server node
10) click New Web Project - GF is still not available

So either something is wrong with my steps or the changeset did not introduced the regression (or both).
Comment 5 Jiri Skrivanek 2011-10-18 13:33:18 UTC
I tried to revert only this

and it solved this issue. I do not have ergonomics built (cluster.config=standard). Do you have valid GlassFish 3.1.1 installation with domain under /glassfish/home?
Comment 6 Petr Hejl 2011-10-18 13:41:39 UTC
(In reply to comment #5)
> I tried to revert only this
> and it solved this issue. I do not have ergonomics built
> (cluster.config=standard). Do you have valid GlassFish 3.1.1 installation with
> domain under /glassfish/home?

Yep, fresh GF 3.1.1 (zip download). I'll try that with standard cluster config. At least we have a fix. I want to investigate it more because obviously GF Java EE 6 depends on unclear side effects of OptionalFactory instantiation which prevents postponing of initialization. 

If nothing else we should create a unit test for this.

BTW Jirko, is this test only issue or is this observable by user? I'm asking because there may be different code path affecting the GF Java EE instantiation.
Comment 7 Jiri Skrivanek 2011-10-18 13:48:07 UTC
It is only in tests. I tried to install NB+GF from installer and haven't reproduced faulty behaviour.
Comment 8 Petr Hejl 2011-10-18 20:08:21 UTC
This is how the Java EE instance is created. I'll try to fix it and/or making it more clear.

     [exec] 	at org.netbeans.modules.glassfish.javaee.JavaEEServerModuleFactory.createModule(
     [exec] 	at org.netbeans.modules.glassfish.common.GlassfishInstance.updateFactories(
     [exec] 	at org.netbeans.modules.glassfish.common.GlassfishInstance.updateModuleSupport(
     [exec] 	at org.netbeans.modules.glassfish.common.GlassfishInstanceProvider.loadServerInstances(
     [exec] 	at org.netbeans.modules.glassfish.common.GlassfishInstanceProvider.init(
     [exec] 	at org.netbeans.modules.glassfish.common.GlassfishInstanceProvider.getEe6(
     [exec] 	at org.netbeans.modules.glassfish.spi.ServerUtilities.getEe6Utilities(
     [exec] 	at org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory.createEe6(
     [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke(
     [exec] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
     [exec] 	at java.lang.reflect.Method.invoke(
     [exec] 	at org.netbeans.core.startup.layers.BinaryFS$AttrImpl$MethodAndParams.invoke(
     [exec] 	at org.netbeans.core.startup.layers.BinaryFS$AttrImpl.getValue(
     [exec] 	at org.netbeans.core.startup.layers.BinaryFS$BFSBase.getAttribute(
     [exec] 	at org.openide.filesystems.MultiFileObject.getAttribute(
     [exec] 	at org.openide.filesystems.MultiFileObject.getAttribute(
     [exec] 	at org.openide.filesystems.MultiFileObject.getAttribute(
     [exec] 	at org.openide.filesystems.MultiFileObject.getAttribute(
     [exec] 	at org.openide.filesystems.MultiFileObject.getAttribute(
     [exec] 	at org.netbeans.core.startup.layers.BinaryFS$FileMap.get(
     [exec] 	at
     [exec] 	at
     [exec] 	at org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.init(
     [exec] 	at org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.instancesMap(
     [exec] 	at org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.getInstanceURLs(
     [exec] 	at org.netbeans.modules.j2ee.deployment.plugins.api.InstanceProperties.getInstanceList(
     [exec] 	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.getServerInstanceIDs(
     [exec] 	at org.netbeans.modules.j2ee.common.project.ui.ProjectServerPanel.initServers(
     [exec] 	at org.netbeans.modules.j2ee.common.project.ui.ProjectServerPanel.<init>(
     [exec] 	at org.netbeans.modules.j2ee.common.project.ui.ProjectServerPanel.<init>(
     [exec] 	at org.netbeans.modules.j2ee.common.project.ui.ProjectServerWizardPanel.getComponent(
Comment 9 Petr Hejl 2011-10-19 11:28:53 UTC
I reverted changes introduced by f099b820fb2e in web-main 9edf314f30ca.

By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo