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...
Status: VERIFIED FIXED
Product: serverplugins
Classification: Unclassified
Component: Infrastructure
7.1
All All
: P1 (vote)
: 7.1
Assigned To: Petr Hejl
issues@serverplugins
: REGRESSION, T9Y, TEST
Depends on:
Blocks:
  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
:


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

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 http://hg.netbeans.org/web-main/rev/f099b820fb2e.

Specifically...

http://hg.netbeans.org/web-main/diff/f099b820fb2e/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/spi/support/ProxyOptionalFactory.java

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

http://hg.netbeans.org/web-main/diff/f099b820fb2e/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/spi/support/ProxyOptionalFactory.java

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
> 
> http://hg.netbeans.org/web-main/diff/f099b820fb2e/j2eeserver/src/org/netbeans/modules/j2ee/deployment/plugins/spi/support/ProxyOptionalFactory.java
> 
> 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(JavaEEServerModuleFactory.java:122)
     [exec] 	at org.netbeans.modules.glassfish.common.GlassfishInstance.updateFactories(GlassfishInstance.java:194)
     [exec] 	at org.netbeans.modules.glassfish.common.GlassfishInstance.updateModuleSupport(GlassfishInstance.java:208)
     [exec] 	at org.netbeans.modules.glassfish.common.GlassfishInstanceProvider.loadServerInstances(GlassfishInstanceProvider.java:476)
     [exec] 	at org.netbeans.modules.glassfish.common.GlassfishInstanceProvider.init(GlassfishInstanceProvider.java:412)
     [exec] 	at org.netbeans.modules.glassfish.common.GlassfishInstanceProvider.getEe6(GlassfishInstanceProvider.java:134)
     [exec] 	at org.netbeans.modules.glassfish.spi.ServerUtilities.getEe6Utilities(ServerUtilities.java:99)
     [exec] 	at org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory.createEe6(Hk2OptionalFactory.java:103)
     [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     [exec] 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
     [exec] 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     [exec] 	at java.lang.reflect.Method.invoke(Method.java:616)
     [exec] 	at org.netbeans.core.startup.layers.BinaryFS$AttrImpl$MethodAndParams.invoke(BinaryFS.java:728)
     [exec] 	at org.netbeans.core.startup.layers.BinaryFS$AttrImpl.getValue(BinaryFS.java:658)
     [exec] 	at org.netbeans.core.startup.layers.BinaryFS$BFSBase.getAttribute(BinaryFS.java:504)
     [exec] 	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:930)
     [exec] 	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:863)
     [exec] 	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:926)
     [exec] 	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:863)
     [exec] 	at org.openide.filesystems.MultiFileObject.getAttribute(MultiFileObject.java:791)
     [exec] 	at org.netbeans.core.startup.layers.BinaryFS$FileMap.get(BinaryFS.java:1083)
     [exec] 	at org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyOptionalFactory.getDelegate(ProxyOptionalFactory.java:174)
     [exec] 	at org.netbeans.modules.j2ee.deployment.plugins.spi.support.ProxyOptionalFactory.finishServerInitialization(ProxyOptionalFactory.java:157)
     [exec] 	at org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.init(ServerRegistry.java:164)
     [exec] 	at org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.instancesMap(ServerRegistry.java:185)
     [exec] 	at org.netbeans.modules.j2ee.deployment.impl.ServerRegistry.getInstanceURLs(ServerRegistry.java:292)
     [exec] 	at org.netbeans.modules.j2ee.deployment.plugins.api.InstanceProperties.getInstanceList(InstanceProperties.java:326)
     [exec] 	at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.getServerInstanceIDs(Deployment.java:329)
     [exec] 	at org.netbeans.modules.j2ee.common.project.ui.ProjectServerPanel.initServers(ProjectServerPanel.java:731)
     [exec] 	at org.netbeans.modules.j2ee.common.project.ui.ProjectServerPanel.<init>(ProjectServerPanel.java:118)
     [exec] 	at org.netbeans.modules.j2ee.common.project.ui.ProjectServerPanel.<init>(ProjectServerPanel.java:106)
     [exec] 	at org.netbeans.modules.j2ee.common.project.ui.ProjectServerWizardPanel.getComponent(ProjectServerWizardPanel.java:112)
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