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 15477 - ServiceType's from reinstalled module not always found in lookup/service pool
Summary: ServiceType's from reinstalled module not always found in lookup/service pool
Status: VERIFIED FIXED
Alias: None
Product: platform
Classification: Unclassified
Component: Lookup (show other bugs)
Version: 3.x
Hardware: PC Solaris
: P3 blocker (vote)
Assignee: David Strupl
URL:
Keywords:
: 15979 16980 (view as bug list)
Depends on: 16328
Blocks:
  Show dependency tree
 
Reported: 2001-09-13 22:50 UTC by Jesse Glick
Modified: 2008-12-22 21:43 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
The log from -Dorg.openide.loaders.FolderInstance=-5 (2.77 KB, text/plain)
2002-01-18 09:26 UTC, Jaroslav Tulach
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2001-09-13 22:50:13 UTC
[aug 31 qbe and dev sep 12] Sometimes after reinstalling a module (an
example module in my case, and using JAR Packager + apisupport to
reload) the executor types are not found. They appear correctly under
Executors, with the correct InstanceCookie etc., but do not appear in
lookup nor in the services registry. Changes made to the Executors
folder do not trigger a refresh. At other times the services do appear
correctly. They are implemented with a .settings file in the usual
style (Services/Executor/ with SystemFileSystem.localizingBundle,
.icon, .layer=project). I do not have the projects module installed,
if it matters. After restarting the IDE they generally appear.
Sometimes it is OK even after a reload; could be some sort of timing
issue.
Comment 1 Jesse Glick 2001-09-24 20:23:01 UTC
Still open in [dev sep 23], this time from apisupport.
Comment 2 Petr Slegr 2001-10-03 12:45:47 UTC
*** Issue 15979 has been marked as a duplicate of this issue. ***
Comment 3 Petr Slegr 2001-10-03 12:53:09 UTC
Priority raised due to large impact.
Comment 4 Petr Slegr 2001-10-03 12:53:27 UTC
*** Issue 15979 has been marked as a duplicate of this issue. ***
Comment 5 Jaroslav Tulach 2001-10-04 10:28:13 UTC
Well bug with "sometimes" is often hard to fix. I tried the issue
#15959 and it seems to work. Because these bugs are duplicate. I am
going to close this one too.
Comment 6 Jesse Glick 2001-10-07 19:25:01 UTC
This is still broken for me in [dev oct 5], at least the first time I
tried it. Ran openide/build.xml:example-minicomposer-test once;
minicomposer was built and installed. Click on some Java class; in the
Execution tab, External AU Player and Internal AU Player appear. Run
the reload target again; click on some other class; players are no
longer there.

They are still listed in Execution Types. You can if you like make a
copy of them (e.g. New Executor ...) and this will appear in the
pulldown of available executors, but not the ones installed by layer,
until the IDE is restarted.
Comment 7 Jaroslav Tulach 2001-10-08 11:19:57 UTC
Fix of issue 11965 should fix this bug too.
Comment 8 Jesse Glick 2001-10-08 19:55:23 UTC
This does appear to be fixed in [dev oct 8]. (The original problem was
not 100% reproducible but I have tried reloading a few times and the
services are always in the drop-down list, so I think it is fixed.)
Comment 9 Mirek Kopriva 2002-01-17 15:54:33 UTC
When reinstalling a module (By using API Support on .jar file), which 
installs a Debugger Type.
The debugger type doesn't appear in properties of a file (Data
Object).
But it appears under Debugger Types in Options. It happens always.
(I've tryied even on a simple module with a debugger type for testing)
Comment 10 Jaroslav Tulach 2002-01-18 08:43:51 UTC
I'll try to reproduce it but I am downgrading the priority. Likely
this issues does not prevent us from releasing 3.3?
Comment 11 Jaroslav Tulach 2002-01-18 09:25:27 UTC
It is a bug in InstanceDataObject - it returns null even it should
not. I am attaching log from FolderInstance. Please investigate why
the IDO returns null.


Comment 12 Jaroslav Tulach 2002-01-18 09:26:18 UTC
Created attachment 4257 [details]
The log from -Dorg.openide.loaders.FolderInstance=-5
Comment 13 Jesse Glick 2002-01-18 11:43:32 UTC
Presumably a timing problem with changing the instance file vs.
changing the module enablement state. I am not sure this is P2 if it
only affects module reloading. Anyway fixing it for 3.3.1 is probably
not reasonable.

BTW now is the time to decide whether to change module enablement +
classloader change firing behavior for 3.4, it seems a lot more code
relies on details of this than it was planned to support, so it ought
to be more deterministic, probably documented as synchronous. This
should help simplify logic in settings code.
Comment 14 Jan Pokorsky 2002-01-18 15:00:52 UTC
Here is what I found out. At the time the FolderInstance obtains 
PROP_CHILDREN caused by adding the module layer the ModuleInfo is not 
accessible through the Lookup yet. So IDO does not provide 
InstanceCookie.

We can either fix/improve the module system as Jesse suggested or I 
can implement workaround in IDO binding IDO with ModuleInfo later when 
it is accessible and fire PROP_COOKIE.

Lowering priority to P3.
Comment 15 Jesse Glick 2002-01-18 16:00:07 UTC
We should probably do both, actually.
Comment 16 Jan Pokorsky 2002-01-21 16:08:45 UTC
Jesse, is it really necessary to implement the late binding when the 
module system will be synchronous? Why?
Comment 17 Jesse Glick 2002-01-21 17:37:18 UTC
I'm not sure what you mean by late binding but it should not be
necessary. I just meant that IDO should continue to fire PROP_COOKIES
if a module is installed or uninstalled and the IDO remains where it is.
Comment 18 Jan Pokorsky 2002-01-21 17:49:17 UTC
*** Issue 16980 has been marked as a duplicate of this issue. ***
Comment 19 Jan Pokorsky 2002-01-21 18:45:11 UTC
By 'late binding' I meant binding IDO with the ModuleInfo later (added 
PropertyChangeListener) when it is accessible through the Lookup and 
then firing PROP_COOKIE. Present implementation does not provide 
ModuleInfo in the Lookup when the layer of an installed module is 
added to the default filesystem.
Comment 20 Jan Pokorsky 2002-05-24 20:26:07 UTC
I've checked out the issue again using the reworked settings framework 
and find out the PROP_COOKIES is fired correctly by IDO now, but the 
Lookup still does not refresh properly. David can you take a look at 
it please?
Comment 21 David Strupl 2002-06-26 16:57:21 UTC
Hi,

I have tried following test in DynamicJava from Scripting console:

import org.openide.util.*;
import org.openide.compiler.*;

l = Lookup.getDefault();

r = l.lookup(new Lookup.Template(CompilerType.class, null, null));
r.allInstances();

When repeating I have just executed the last line. Then I tried to
1. move some compiler definitions to the project layer
2. repeatedly disable/enable the module containing the compilers

The returned instances were always ok (and were indeed different after
re-enabling the module).

So I am closing this as fixed. If you disagree please reopen and add
steps (or test) demonstrating the problem. Thanks for your time.
Comment 22 Jesse Glick 2002-06-26 17:55:41 UTC
Not able to reproduce in [dev jun 26] after reinstalling minicomposer
example a couple of times. Perhaps fixed by something else.
Comment 23 pzajac 2003-07-31 10:53:07 UTC
verified