Build: NetBeans IDE Dev (Build 201110160600)
VM: Java HotSpot(TM) Client VM, 21.0-b17, Java(TM) SE Runtime Environment, 1.7.0-b147
OS: Windows 7
MackSix: I shut down netbeans and restarted it and this happened.
GUEST: i just used the auto apdater
Created attachment 112106 [details]
Happens every shutdown. Needs to be solved for 7.1 I think.
The problem is that
called from BundleActivator.stop() is called sooner than
Can be workarounded by somebody calling
org.eclipse.equinox.internal.security.storage.PasswordProviderSelector.getInstances() while the system is running.
(In reply to comment #3)
> The problem is that
> called from BundleActivator.stop() is called sooner than
> Can be workarounded by somebody calling
who would be that?
> while the system is running.
would that be possible to access? org.eclipse.equinox.internal.security.storage is exported with x-internal:=true ...
The other solution could be to play with OSGi start levels. Make sure org.eclipse.core.internal.registry has lower level than org.eclipse.equinox.internal.security.auth.
*** Bug 202526 has been marked as a duplicate of this bug. ***
*** Bug 204740 has been marked as a duplicate of this bug. ***
Created attachment 113054 [details]
startlevel 4 for all our OSGi bundles, 3 for registry
Registry needs to be initialized sooner than other bundles and shut down later. In OSGi world this cannot be achieved with mutual dependencies, but rather by assigning different start levels.
The diff contains small API change documented in harness/README. Jesse, please approve.
[JG01] $level.length() == 0 :: $level instanceof java.lang.String => $level.isEmpty();;
[JG02] Why do we need to specify module.startlevel=4 for every OSGi bundle in NB? Why is the default not good enough for them, just overriding it for one or both of the two bundles mentioned in this bug report? If it is because the default is 1 and we cannot use 0 for o.eclipse.equinox.registry for some reason, can we use 2 (or higher) for just o.eclipse.equinox.security? Or set an IDE-wide default of 4 using branding (IIRC there was some other API change for this recently)?
[JG03] "#NOI18N" may not be written "# NOI18N".
> [JG02] Most bundles in Eclipse run with startlevel 4. Now, when it is clear we cannot deal without startlevel, I thought that keeping things consistent with Eclipse is beneficial. I could possibly change projectized.xml to use module.startlevel=4 by default, so we don't need to override it in all our bundle wrapping modules.
module.startlevel=4 in projectized.xml would suffice, I think.
Already propagated to main:
This has regressed in dev builds.
It regressed because I removed usage of startlevels. According to OSGi experts, the shutdown order is opposite to start order and in LazyActivation mode, the order should follow the usage of classes/singletons. So the behavior should be OK without startlevels. Probably Equinox 3.5 is broken.
Update to Equinox 3.7.1 seems to fix this problem.
Created attachment 116042 [details]
This bug already has 10 duplicates
Dependency on bug 207199 is probably not correct. This issue is random, sometimes NPE is thrown, sometimes not.
Probably depends on who resolves the bundle and activates it. Maybe usage of transitive dependency would help then.
By the way it seems that a bunch of reports attached to this bug are actually unrelated, such as exception #562500.
Created attachment 116150 [details]
Trying to override an (empty) <folder> in favorites module with an (empty) <file> in projectui.
Update to 3.7.1 have not fixed anything. Reported as
Created attachment 116985 [details]
Switched project group before scanning has even started
Integrated into 'main-golden', will be available in build *201203220400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
User: Jaroslav Tulach <firstname.lastname@example.org>
Log: #203790: Using JAR as attached to Eclipse bug 374466.