Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 269170 - NPE in BundlesAction when using update.configurator without simpleconfigurator
Summary: NPE in BundlesAction when using update.configurator without simpleconfigurator
Status: RESOLVED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 3.5 M7   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-03-18 07:42 EDT by Thomas Hallgren CLA
Modified: 2009-03-30 11:21 EDT (History)
1 user (show)

See Also:


Attachments
Patch to correct the problem (2.58 KB, patch)
2009-03-18 07:49 EDT, Thomas Hallgren CLA
pascal: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Hallgren CLA 2009-03-18 07:42:06 EDT
An attempt to publish a product that contains the org.eclipse.update.configurator but not the equinox.simpleconfigurator results in the following exception:

Caused by: java.lang.NullPointerException
	at org.eclipse.core.internal.runtime.Activator.getURLConverter(Activator.java:313)
	at org.eclipse.core.runtime.FileLocator.toFileURL(FileLocator.java:205)
	at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.getBundleDescriptions(BundlesAction.java:778)
	at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.perform(BundlesAction.java:576)
	at org.eclipse.equinox.p2.publisher.Publisher.publish(Publisher.java:170)
Comment 1 Thomas Hallgren CLA 2009-03-18 07:49:57 EDT
Created attachment 129196 [details]
Patch to correct the problem

The failing code is in the getBundleDescriptions() method where an attempt is made to find the simpleconfigurator jar, wihtout a version, inside the BundlesAction bundle.

I changed this so that the Bundle is retrieved using the Platform.getBundle() and the file appointing it is obtained using the FileLocator.getBundleFile()
Comment 2 Pascal Rapicault CLA 2009-03-30 11:21:27 EDT
Fixed in HEAD.