Bug 533024 - BundleException in ModuleContainer
Summary: BundleException in ModuleContainer
Status: NEW
Alias: None
Product: PDE
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.9   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: PDE-UI-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-28 15:59 EDT by Patrick Tasse CLA
Modified: 2022-11-23 13:44 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Tasse CLA 2018-03-28 15:59:25 EDT
Since a couple of months ago, I have been getting multiple exceptions every time I launch an Eclipse Application from the run configurations. I'm using a 4.7 Oxygen target but launching from a 4.8 Photon installation (latest 4.8 I-build).

I tried with a new workspace, new run configuration, and reloading the target, but could not find a way to get rid of the exceptions.

I'm not sure if I did something wrong or if something got corrupted in my installation, if you have any pointers for what I could try to cleanup without breaking my workspace or Eclipse installation, please let me know.

If the problem is on my side I apologize in advance for the noise ;)

Here is what I observe:

I first get a couple of hundred of these:

!ENTRY org.eclipse.update.configurator 4 0 2018-03-28 15:38:43.382
!MESSAGE Could not install bundle plugins/org.apache.commons.lang3_3.1.0.v201403281430.jar   A bundle is already installed with the name "org.apache.commons.lang3" and version "3.1.0.v201403281430"

Followed by a couple of hundred of these:

!ENTRY org.eclipse.equinox.preferences 4 0 2018-03-28 15:38:46.918
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.equinox.preferences [421]
  Another singleton bundle selected: osgi.identity; osgi.identity="org.eclipse.equinox.preferences"; type="osgi.bundle"; version:Version="3.7.0.v20170126-2132"; singleton:="true"

	at org.eclipse.osgi.container.Module.start(Module.java:444)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1550)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

(some of the bundles in the first list also show up in the second list, but not all of them)

I tried debugging the first set of errors. They are thrown from this stack trace:

Daemon Thread [Start Level: Equinox Container: 4b798229-cb46-4141-8cdc-b6ce2ba2a2d1] (Suspended (exception BundleException))	
	owns: ServiceFactoryUse<S>  (id=223)	
	owns: Object  (id=224)	
	owns: Object  (id=94)	
	ModuleContainer.install(Module, String, ModuleRevisionBuilder, Object) line: 267	
	Storage.install(Module, String, URLConnection) line: 544	
	BundleContextImpl.installBundle(String, InputStream) line: 146	
	ConfigurationActivator.installBundles() line: 221	
	ConfigurationActivator.start(BundleContext) line: 86	
	BundleContextImpl$3.run() line: 779	
	BundleContextImpl$3.run() line: 1	
	AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]	
	BundleContextImpl.startActivator(BundleActivator) line: 772	
	BundleContextImpl.start() line: 729	
	EquinoxBundle.startWorker0() line: 933	
	EquinoxBundle$EquinoxModule.startWorker() line: 309	
	EquinoxBundle$EquinoxModule(Module).doStart(Module$StartOptions...) line: 581	
	EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 449	
	SecureAction.start(Module, Module$StartOptions...) line: 468	
	EclipseLazyStarter.postFindLocalClass(String, Class<?>, ClasspathManager) line: 103	
	ClasspathManager.findLocalClass(String) line: 529	
	EquinoxClassLoader(ModuleClassLoader).findLocalClass(String) line: 328	
	BundleLoader.findLocalClass(String) line: 368	
	BundleLoader.findClassInternal(String, boolean) line: 446	
	BundleLoader.findClass(String, boolean) line: 395	
	BundleLoader.findClass(String) line: 387	
	EquinoxClassLoader(ModuleClassLoader).loadClass(String, boolean) line: 150	
	EquinoxClassLoader(ClassLoader).loadClass(String) line: 357	
	EquinoxBundle.loadClass(String) line: 564	
	SingleComponentManager<S>(AbstractComponentManager<S>).initDependencyManagers() line: 976	
	SingleComponentManager<S>(AbstractComponentManager<S>).collectDependencies(ComponentContextImpl<S>) line: 1003	
	SingleComponentManager<S>.getServiceInternal(ServiceRegistration<S>) line: 859	
	SingleComponentManager<S>.getService(Bundle, ServiceRegistration<S>) line: 823	
	ServiceFactoryUse$1.run() line: 212	
	AccessController.doPrivileged(PrivilegedAction<T>) line: not available [native method]	
	ServiceFactoryUse<S>.factoryGetService() line: 210	
	ServiceFactoryUse<S>.getService() line: 111	
	ServiceConsumer$2.getService(ServiceUse<S>) line: 45	
	ServiceRegistrationImpl<S>.getService(BundleContextImpl, ServiceConsumer) line: 508	
	ServiceRegistry.getService(BundleContextImpl, ServiceReferenceImpl<S>) line: 461	
	BundleContextImpl.getService(ServiceReference<S>) line: 624	
	ServiceTracker<S,T>.addingService(ServiceReference<S>) line: 414	
	ServiceTracker$Tracked.customizerAdding(ServiceReference<S>, ServiceEvent) line: 941	
	ServiceTracker$Tracked.customizerAdding(Object, Object) line: 1	
	ServiceTracker$Tracked(AbstractTracked<S,T,R>).trackAdding(S, R) line: 256	
	ServiceTracker$Tracked(AbstractTracked<S,T,R>).track(S, R) line: 229	
	ServiceTracker$Tracked.serviceChanged(ServiceEvent) line: 901	
	FilteredServiceListener.serviceChanged(ServiceEvent) line: 109	
	BundleContextImpl.dispatchEvent(Object, Object, int, Object) line: 920	
	EventManager.dispatchEvent(Set<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 230	
	ListenerQueue<K,V,E>.dispatchEventSynchronous(int, E) line: 148	
	ServiceRegistry.publishServiceEventPrivileged(ServiceEvent) line: 862	
	ServiceRegistry.publishServiceEvent(ServiceEvent) line: 801	
	ServiceRegistrationImpl<S>.register(Dictionary<String,?>) line: 127	
	ServiceRegistry.registerService(BundleContextImpl, String[], Object, Dictionary<String,?>) line: 225	
	BundleContextImpl.registerService(String[], Object, Dictionary<String,?>) line: 469	
	AbstractComponentManager$3.register(String[]) line: 887	
	AbstractComponentManager$3.register(String[]) line: 874	
	AbstractComponentManager$3(RegistrationManager<T>).changeRegistration(RegistrationManager$RegState, String[]) line: 132	
	SingleComponentManager<S>(AbstractComponentManager<S>).registerService() line: 941	
	SingleComponentManager<S>(AbstractComponentManager<S>).activateInternal() line: 741	
	SingleComponentManager<S>(AbstractComponentManager<S>).enableInternal() line: 675	
	SingleComponentManager<S>(AbstractComponentManager<S>).enable(boolean) line: 430	
	ComponentRegistry$DefaultConfigurableComponentHolder<S>(ConfigurableComponentHolder<S>).enableComponents(boolean) line: 657	
	BundleComponentActivator.initialEnable() line: 341	
	Activator.loadComponents(Bundle) line: 390	
	Activator.access$200(Activator, Bundle) line: 54	
	Activator$ScrExtension.start() line: 265	
	Activator(AbstractExtender).createExtension(Bundle) line: 254	
	Activator(AbstractExtender).modifiedBundle(Bundle, BundleEvent, Object) line: 227	
	Activator(AbstractExtender).addingBundle(Bundle, BundleEvent) line: 187	
	BundleTracker$Tracked.customizerAdding(Bundle, BundleEvent) line: 469	
	BundleTracker$Tracked.customizerAdding(Object, Object) line: 1	
	BundleTracker$Tracked(AbstractTracked<S,T,R>).trackAdding(S, R) line: 256	
	BundleTracker$Tracked(AbstractTracked<S,T,R>).track(S, R) line: 229	
	BundleTracker$Tracked.bundleChanged(BundleEvent) line: 444	
	BundleContextImpl.dispatchEvent(Object, Object, int, Object) line: 908	
	EventManager.dispatchEvent(Set<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 230	
	ListenerQueue<K,V,E>.dispatchEventSynchronous(int, E) line: 148	
	EquinoxEventPublisher.publishBundleEventPrivileged(BundleEvent) line: 213	
	EquinoxEventPublisher.publishBundleEvent(BundleEvent) line: 120	
	EquinoxEventPublisher.publishBundleEvent(int, Bundle, Bundle) line: 112	
	EquinoxContainerAdaptor.publishModuleEvent(ModuleContainerAdaptor$ModuleEvent, Module, Module) line: 168	
	EquinoxBundle$EquinoxModule(Module).publishEvent(ModuleContainerAdaptor$ModuleEvent) line: 476	
	EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 467	
	ModuleContainer$ContainerStartLevel.incStartLevel(int, List<Module>, boolean) line: 1634	
	ModuleContainer$ContainerStartLevel.incStartLevel(int, List<Module>) line: 1613	
	ModuleContainer$ContainerStartLevel.doContainerStartLevel(Module, int, FrameworkListener...) line: 1585	
	ModuleContainer$ContainerStartLevel.dispatchEvent(Module, FrameworkListener[], int, Integer) line: 1528	
	ModuleContainer$ContainerStartLevel.dispatchEvent(Object, Object, int, Object) line: 1	
	EventManager.dispatchEvent(Set<Entry<K,V>>, EventDispatcher<K,V,E>, int, E) line: 230	
	EventManager$EventThread<K,V,E>.run() line: 340	

As far as I can tell, the bundle was loaded earlier in the startup by this stack trace:

Thread [main] (Suspended (breakpoint at line 214 in Capabilities))	
	owns: Object  (id=87)	
	owns: Object  (id=88)	
	Capabilities.addCapabilities(ModuleRevision) line: 214	
	ModuleDatabase.addCapabilities(ModuleRevision) line: 803	
	ModuleDatabase.load(String, ModuleRevisionBuilder, Object, long, EnumSet<Settings>, int) line: 265	
	ModuleDatabase.install(String, ModuleRevisionBuilder, Object) line: 212	
	ModuleContainer.install(Module, String, ModuleRevisionBuilder, Object) line: 270	
	Storage.install(Module, String, URLConnection) line: 544	
	BundleContextImpl.installBundle(String, InputStream) line: 146	
	BundleContextImpl.installBundle(String) line: 139	
	ConfigApplier.installBundles(BundleInfo[], Collection<Bundle>) line: 310	
	ConfigApplier.install(URL, boolean) line: 98	
	SimpleConfiguratorImpl.applyConfiguration(URL) line: 192	
	SimpleConfiguratorImpl.applyConfiguration() line: 207	
	Activator.start(BundleContext) line: 61	
	BundleContextImpl$3.run() line: 779	
	BundleContextImpl$3.run() line: 1	
	AccessController.doPrivileged(PrivilegedExceptionAction<T>) line: not available [native method]	
	BundleContextImpl.startActivator(BundleActivator) line: 772	
	BundleContextImpl.start() line: 729	
	EquinoxBundle.startWorker0() line: 933	
	EquinoxBundle$EquinoxModule.startWorker() line: 309	
	EquinoxBundle$EquinoxModule(Module).doStart(Module$StartOptions...) line: 581	
	EquinoxBundle$EquinoxModule(Module).start(Module$StartOptions...) line: 449	
	ModuleContainer$ContainerStartLevel.incStartLevel(int, List<Module>, boolean) line: 1634	
	ModuleContainer$ContainerStartLevel.incStartLevel(int, List<Module>) line: 1614	
	ModuleContainer$ContainerStartLevel.doContainerStartLevel(Module, int, FrameworkListener...) line: 1585	
	EquinoxBundle$SystemBundle$EquinoxSystemModule(SystemModule).startWorker() line: 264	
	EquinoxBundle$SystemBundle$EquinoxSystemModule(Module).doStart(Module$StartOptions...) line: 581	
	EquinoxBundle$SystemBundle$EquinoxSystemModule(Module).start(Module$StartOptions...) line: 449	
	EquinoxBundle$SystemBundle$EquinoxSystemModule(SystemModule).start(Module$StartOptions...) line: 188	
	EquinoxBundle$SystemBundle(EquinoxBundle).start(int) line: 383	
	EquinoxBundle$SystemBundle(EquinoxBundle).start() line: 402	
	Equinox.start() line: 115	
	EclipseStarter.startup(String[], Runnable) line: 326	
	EclipseStarter.run(String[], Runnable) line: 239	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: 62	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 43	
	Method.invoke(Object, Object...) line: 498	
	Main.invokeFramework(String[], URL[]) line: 653	
	Main.basicRun(String[]) line: 590	
	Main.run(String[]) line: 1499	
	Main.main(String[]) line: 1472	

In both stack traces I could find somewhere in the variables that the bundle came from this location:

file:<workspace>/.metadata/.plugins/org.eclipse.pde.core/.bundle_pool/plugins/org.apache.commons.lang3_3.1.0.v201403281430.jar
Comment 1 Thomas Watson CLA 2018-12-12 15:09:45 EST
Sorry for the silence on this issue.  It looks like you are targeting something that still has `org.eclipse.update.configurator` and it is trying to run its reconsiler to install bundles also (along with p2 simpleconfigurator).

Moving to PDE because I thought it did something to stop old `org.eclipse.update.configurator` from doing this.
Comment 2 Eclipse Genie CLA 2020-12-02 00:14:15 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.
Comment 3 Eclipse Genie CLA 2022-11-23 13:44:34 EST
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.