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.
NetBeans IDE Dev (Build 200806280102) Java: 1.6.0_10-beta; Java HotSpot(TM) Client VM 11.0-b11 System: Windows XP version 5.1 It seems that the IDE does not recognize that the glassfish v3 server has been installed, and wants to install another copy. 1. Install the IDE. Accept the defaults for all three servers (apache, gf v2, gf v3tp2). (fresh userdir, no import of settings). 2. Create a web project. In the second screen "Servers and Setting" >only apache and glassfish v2 are available in the dropdown 3. User has to press Add button to discover the v3 server, chooses server "Glassfish V3 TP2", presses next. > C:\Documents and Settings\Krystyna Polomski\GlassFish_V3_TP2 appears in installation location There is a checkbox, unchecked, to read and accepted license agreement. If the user checks this, the Download V3 Now button is activated. Pressing the button downloads another gf v3 in the location in step 3. User now has 2 Glassfish v3tp2 installations. Of course, the second and unneeded download will not be successful on Windows because of the current install-in-space issue with gf v3 tp2. The workaround is for the user to add another server instance and override the default location and have remembered the initial installation C:\Sun\glassfish-v3tp2. And of course, user should not check the agreement or press the download button. ---- I discovered that from the Menu bar, Tools > Servers > will show GF V3 immediately after an installation. And if the user does this, then glassfish V3 will appear in the dropdown at project creation, and this bug's ugly side effects will *not* occur.
Since the installer part is working fine (from the Menu bar, Tools > Servers > will show GF V3 immediately after an installation) then reassigning to serverplugins and Vince, in person.
With (Build 200806300101) I have no such problem, gf v3 is recognised in both Runtime view and upon web project creation. But I've changed folder for server installation...
This does happen with the current build. Just reproduced on Mac. To reproduce it, at minimum you have to de-install at least the gf V3 server as well as .netbeans/dev before installation (clean userdir). If the first thing after installation, you attempt to create a project, you will reproduce the issue of not seeing gf v3 and having to add the server. On adding the server a new default location appears. On Mac, this is, /Users/krystynapolomski/GlassFish_V3_TP2 along with the download button etc. etc. NetBeans IDE Dev (Build 200806300101)
Ok, i I'm able to reproduce it. But there's simple workaround: Just go to runtime tab, and unfold Servers node. After that, both servers are shown upon creating new web project.
I can reproduce this. The problem appears to be related to the server registries... When the wizard opens, the j2eeserver's ServerRegistry is initialized and that registry is used to populate the server selection combo box. The initialization of the j2eeserver ServerRegistry doesn't seem to trigger the initialization of the server ServerRegistry (which is where the GF V3 server gets registered).... and the V3 instance is not registered in the IDE until after the server ServerRegistry is is initialized... It looks like the "easy" fix is to make the j2eeeserver ServerRegistry initialization depend on the server ServerRegistry... but that seems like it is probably wrong. Petr H: please comment and reassign to me, if there is a code change in glassfish.* code that will resolve this.
Hi Vince, I believe the registration of the default instance should be done with static initializer not in provider constructor. J2ee DeploymentFactory can invoke class initialization of the provider. Now the important part - the patch as it is does not work - actually it introduces exception. The trouble is in following code path: ServerRegistry.init() -> .... Hk2DeploymentFactory.create() -> ServerUtilities.getServerProvider() -> GlassFishInstanceProvider.<init> -> GlassFishInstanceProvider.registerDefaultInstance() -> GlassFishInstance.create() -> GlassFishInstance.<cinit> -> GlassFishInstance.updateModuleSupport() -> JavaEEServerModuleFactory.createModule() -> InstanceProperties.createInstancePropertiesWithoutUI() As you see the plugin is trying to register instance (the last line), but registry is not yet initialized (the first line). So I think GlassfishModuleFactory should provide some method to such default server registration (you can see JBoss or Tomcat for J2ee default server registration). Maybe there is a way to just write common info and J2EE info without even creating the GlassfishInstance object. Right now I can't propose complete solution, but I believe this should be solved in GFv3 plugin. I know it is bit complicated and we can get back to this and design some general simplification (if possible). It is however needed to preserve j2ee compatibility.
Created attachment 63843 [details] patch invoking the default instance registration - does not work out of the box , see comment
wrong milestone value.
http://hg.netbeans.org/main/rev/2f88c7fbff41
Integrated into 'main-golden', available in build *200807311401* on http://bits.netbeans.org/dev/nightly/ Changeset: http://hg.netbeans.org/main/rev/2f88c7fbff41 User: Vince Kraemer <vkraemer@netbeans.org> Log: #138554 : use new api to finish initialization of the plugin
Verified on WinXP with installer build 200807311401.