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 213957

Summary: Items missing in lookup
Product: platform Reporter: Petr Hejl <phejl>
Component: LookupAssignee: Jaroslav Tulach <jtulach>
Status: RESOLVED FIXED    
Severity: normal CC: mmirilovic
Priority: P2 Keywords: RANDOM
Version: 7.2   
Hardware: PC   
OS: Linux   
Issue Type: DEFECT Exception Reporter:
Attachments: Proposed fixes

Description Petr Hejl 2012-06-11 10:56:18 UTC
From time to time my ServerInstanceProviders are miisng in lookup.

1) Register Java EE server (JBoss works "well", do not use GF).
2) Close the IDE.
3) Open the IDE and expand server node.
4) There is no server.

Recently this is reproducible on my system with recent daily build in about 80% of cases.
Sometimes the server is not visible even in step 1.
Comment 1 Petr Hejl 2012-06-11 11:59:15 UTC
From the server module perspective these instances are present in lookup (my System.out starting with ==TYPE):

==TYPE org.netbeans.modules.cloud.amazon.serverplugin.AmazonJ2EEServerInstanceProvider@6c69757a
==TYPE org.netbeans.modules.glassfish.common.GlassfishInstanceProvider@4f5faa7c
==TYPE org.netbeans.modules.glassfish.common.GlassfishInstanceProvider@4f8aac0a
==TYPE org.netbeans.modules.cloud.oracle.serverplugin.OracleJ2EEServerInstanceProvider@1fca1ead

While it should something like this:
==TYPE org.netbeans.modules.cloud.amazon.serverplugin.AmazonJ2EEServerInstanceProvider@6c69757a
==TYPE org.netbeans.modules.glassfish.common.GlassfishInstanceProvider@4f5faa7c
==TYPE org.netbeans.modules.glassfish.common.GlassfishInstanceProvider@4f8aac0a
==TYPE org.netbeans.modules.cloud.oracle.serverplugin.OracleJ2EEServerInstanceProvider@1fca1ead
==TYPE org.netbeans.modules.j2ee.deployment.impl.bridge.BridgingServerInstanceProvider@6253fe33
==TYPE org.netbeans.modules.j2ee.deployment.impl.bridge.BridgingServerInstanceProvider@44cec792
==TYPE org.netbeans.modules.j2ee.deployment.impl.bridge.BridgingServerInstanceProvider@35e27e8d
==TYPE org.netbeans.modules.j2ee.deployment.impl.bridge.BridgingServerInstanceProvider@6ae1f2ba
==TYPE org.netbeans.modules.j2ee.deployment.impl.bridge.BridgingServerInstanceProvider@71ead142
==TYPE org.netbeans.modules.j2ee.deployment.impl.bridge.BridgingServerInstanceProvider@7b907d9e
==TYPE org.netbeans.modules.j2ee.deployment.impl.bridge.BridgingServerInstanceProvider@589824df
==TYPE org.netbeans.modules.j2ee.deployment.impl.bridge.BridgingServerInstanceProvider@204ad408

BTW this really looks random as sometimes the content of the lookup is ok for the first time but consequent invocations return just the limited set mentioned above.
Comment 2 Jaroslav Tulach 2012-06-11 12:13:48 UTC
Created attachment 120661 [details]
Proposed fixes

Please verify. I will polish the patch meanwhile.
Comment 3 Jaroslav Tulach 2012-06-11 13:43:24 UTC
ergonomics#a8a5cf54b3b1
Comment 4 Quality Engineering 2012-06-12 13:18:06 UTC
Integrated into 'main-golden', will be available in build *201206120719* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/a8a5cf54b3b1
User: Jaroslav Tulach <jtulach@netbeans.org>
Log: #213957: Reordered iterations could confuse the caches