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.
Summary: | Installed Glassfish V3 not discovered at project creation | ||
---|---|---|---|
Product: | serverplugins | Reporter: | _ krystyna <krystyna> |
Component: | GlassFish | Assignee: | Vince Kraemer <vkraemer> |
Status: | VERIFIED FIXED | ||
Severity: | blocker | CC: | blaha, dlipin, phejl, pjiricka |
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: | |
Bug Depends on: | 141427 | ||
Bug Blocks: | |||
Attachments: | patch invoking the default instance registration - does not work out of the box , see comment |
Description
_ krystyna
2008-06-28 17:33:43 UTC
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. 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. |