This Bugzilla instance is deprecated, and most Eclipse projects now use GitHub or Eclipse GitLab. Please see the deprecation plan for details.
Bug 432441 - Installing R3 bundles leads to NPE in BundleFinder.addingBundle
Summary: Installing R3 bundles leads to NPE in BundleFinder.addingBundle
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 4.4   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: 4.4 M7   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-09 10:35 EDT by Thomas Watson CLA
Modified: 2014-04-30 07:23 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Watson CLA 2014-04-09 10:35:44 EDT
OSGi R3 was before bundles actually had a symbolic name.  Yet Equinox does still support OSGi R3 bundles.  I noticed that if an R3 bundle is installed and started then you will get the following stack trace in the log:

!ENTRY org.eclipse.e4.ui.workbench 4 0 2014-04-08 15:59:44.303
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.lang.NullPointerException
	at java.util.concurrent.ConcurrentHashMap.hash(ConcurrentHashMap.java:333)
	at java.util.concurrent.ConcurrentHashMap.get(ConcurrentHashMap.java:988)
	at org.eclipse.e4.ui.internal.workbench.BundleFinder.addingBundle(BundleFinder.java:69)
	at org.eclipse.e4.ui.internal.workbench.BundleFinder.addingBundle(BundleFinder.java:1)
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:469)
	at org.osgi.util.tracker.BundleTracker$Tracked.customizerAdding(BundleTracker.java:1)
	at org.osgi.util.tracker.AbstractTracked.trackAdding(AbstractTracked.java:256)
	at org.osgi.util.tracker.AbstractTracked.track(AbstractTracked.java:229)
	at org.osgi.util.tracker.BundleTracker$Tracked.bundleChanged(BundleTracker.java:444)
	at org.eclipse.osgi.internal.framework.BundleContextImpl.dispatchEvent(BundleContextImpl.java:902)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.ListenerQueue.dispatchEventSynchronous(ListenerQueue.java:148)
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEventPrivileged(EquinoxEventPublisher.java:165)
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:75)
	at org.eclipse.osgi.internal.framework.EquinoxEventPublisher.publishBundleEvent(EquinoxEventPublisher.java:67)
	at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor.publishModuleEvent(EquinoxContainerAdaptor.java:102)
	at org.eclipse.osgi.container.Module.publishEvent(Module.java:466)
	at org.eclipse.osgi.container.Module.start(Module.java:457)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:393)
	at org.eclipse.osgi.internal.framework.EquinoxBundle.start(EquinoxBundle.java:412)

A null check is needed against bundleSymName var if you want to avoid this error.  Note that the error likely has not side effect other than the log entry.  There is no reason for you to be tracking R3 bundles here I think.
Comment 2 Paul Webster CLA 2014-04-29 11:19:50 EDT
This needs to be verified.  Is an R3 bundle just a regular OSGi bundle with no Bundle-SymbolicName ?

PW
Comment 3 Thomas Watson CLA 2014-04-29 15:43:16 EDT
(In reply to Paul Webster from comment #2)
> This needs to be verified.  Is an R3 bundle just a regular OSGi bundle with
> no Bundle-SymbolicName ?
> 
> PW

Yes a bundle without the following headers:

Bundle-ManifestVersion
Bundle-SymbolicName
Comment 4 Paul Webster CLA 2014-04-30 07:23:48 EDT
In 4.4.0.I20140428-2000

PW