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 148296 - IllegalStateException: Common server instance not found for [/home/ll/apps/glassfish-v3tp2/glassfish]deployer:gfv3:localhost:8080
Summary: IllegalStateException: Common server instance not found for [/home/ll/apps/gl...
Status: RESOLVED DUPLICATE of bug 159169
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: All Mac OS X
: P3 blocker (vote)
Assignee: Vince Kraemer
URL: http://statistics.netbeans.org/except...
Keywords:
: 158616 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-09-24 21:57 UTC by _ ludo
Modified: 2009-03-05 00:28 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter: 83756


Attachments
app I try to open and I cannot and get only the exception (16.35 KB, application/x-compressed)
2008-09-24 21:59 UTC, _ ludo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description _ ludo 2008-09-24 21:57:35 UTC
Build: NetBeans IDE Dev (Build 200807290201)
VM: Java HotSpot(TM) Client VM, 10.0-b22, Java(TM) SE Runtime Environment, 1.6.0_06-b02
OS: Linux, 2.6.24-19-generic, i386
User comments: 
STACKTRACE: (first 10 lines)
java.lang.IllegalStateException: Common server instance not found for
[/home/ll/apps/glassfish-v3tp2/glassfish]deployer:gfv3:localhost:8080
        at org.netbeans.modules.glassfish.javaee.Hk2DeploymentManager.getServerInstance(Hk2DeploymentManager.java:420)
        at org.netbeans.modules.glassfish.javaee.Hk2DeploymentManager.getCommonServerSupport(Hk2DeploymentManager.java:433)
        at org.netbeans.modules.glassfish.javaee.AntDeploymentProviderImpl.<init>(AntDeploymentProviderImpl.java:63)
        at org.netbeans.modules.glassfish.javaee.Hk2OptionalFactory.getAntDeploymentProvider(Hk2OptionalFactory.java:132)
        at org.netbeans.modules.j2ee.deployment.impl.ServerInstance.getAntDeploymentProvider(ServerInstance.java:583)
        at
org.netbeans.modules.j2ee.deployment.devmodules.api.AntDeploymentHelper.writeDeploymentScript(AntDeploymentHelper.java:106)
        at org.netbeans.modules.web.project.api.WebProjectUtilities.setupProject(WebProjectUtilities.java:855)
        at org.netbeans.modules.web.project.api.WebProjectUtilities.createProjectImpl(WebProjectUtilities.java:206)
        at org.netbeans.modules.web.project.api.WebProjectUtilities.access$000(WebProjectUtilities.java:112)
        at org.netbeans.modules.web.project.api.WebProjectUtilities$1.run(WebProjectUtilities.java:179)
Comment 1 _ ludo 2008-09-24 21:59:28 UTC
Created attachment 70531 [details]
app I try to open and I cannot and get only the exception
Comment 2 _ ludo 2008-09-24 22:02:32 UTC
http://statistics.netbeans.org/analytics/detail.do?id=83756

Steps:
I register a v3 domain (with funky port numbers, created by NB)
I deploy apps to it
I delete it
I update my runtime (same than old location)
I register the new runtime again and create a new domain with diff port numbers
I try to open the attached project and I cannot. See exception.
My latest NB fresh build
Comment 3 _ ludo 2008-09-24 22:04:17 UTC
deleting private/ dir of the webapp does not help....
Comment 4 _ pcw 2008-09-25 06:26:30 UTC
Sounds like j2eeserver instance & common instance got out of sync (ie there is a j2eeserver instance in existence when
it's corresponding common instance has been removed -- really annoying.)  I'll check it out.
Comment 5 Vince Kraemer 2008-12-02 00:25:56 UTC
could we create a common server instance based on the presence of the j2eeserver instance data to make sure the
registries are parallel?
Comment 6 Vince Kraemer 2009-02-26 16:11:00 UTC
*** Issue 158616 has been marked as a duplicate of this issue. ***
Comment 7 _ pcw 2009-02-26 20:45:39 UTC
Well, I said I'd check this out last fall, but was too busy with Performance Monitor to do it.

I just tried Ludo's steps to reproduce against 6.5p2 and I cannot reproduce this.

Interesting steps though.  I'll think about it.

Having code at the glassfish.javaee level attempt to create a corresponding common instance is troublesome -- first it's
a hack to get around an alleged bug (other than the known issue related to removal of the restart flag in NB 6.7, I'm
not aware of any reproducible bugs in this area, this issue not withstanding).  Second, the system is not designed to be
initialized top down.  In fact, I tried to do that for glassfish.jruby and it caused all kinds of problems due to
unpredictable initialization order.

Right now, initialization always starts at common level.  If a higher order module needs to spur initialization, all it
should do (if anything) is use requisite classes in common and everything will come to life automatically.

My guess is what happened in Ludo's case is that somehow the j2eeserver registry entry for V3 stayed in existence when
the common one was removed.  This shouldn't happen, but if it can, we need to find out how.
Comment 8 Vince Kraemer 2009-03-05 00:28:53 UTC
moving all these illegal states to be under 159169

*** This issue has been marked as a duplicate of 159169 ***