Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 436540

Summary: Build Update Site Fails with NullPointerException
Product: [Eclipse Project] PDE Reporter: Jan Rosczak <jan.rosczak>
Component: BuildAssignee: pde-build-inbox <pde-build-inbox>
Status: CLOSED DUPLICATE QA Contact:
Severity: major    
Priority: P3 CC: curtis.windatt.public
Version: 4.4   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Jan Rosczak CLA 2014-06-04 03:50:42 EDT
I have an Update Site Project and one Feature Project. Building that site in Eclipse 3.8 worked without problems.

Now I upgraded to Eclipse Luna 4.4RC3 and building the same Update Site fails with the following NullPointerException:

java.lang.NullPointerException
	at org.eclipse.osgi.internal.resolver.NativeCodeSpecificationImpl.isSatisfiedBy(NativeCodeSpecificationImpl.java:88)
	at org.eclipse.osgi.internal.module.ResolverImpl.isResolvable(ResolverImpl.java:285)
	at org.eclipse.osgi.internal.module.ResolverImpl.resolveBundles(ResolverImpl.java:639)
	at org.eclipse.osgi.internal.module.ResolverImpl.resolve(ResolverImpl.java:477)
	at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateImpl.java:545)
	at org.eclipse.osgi.internal.resolver.StateImpl.resolve(StateImpl.java:605)
	at org.eclipse.pde.internal.build.site.BuildTimeSite.getRegistry(BuildTimeSite.java:186)
	at org.eclipse.pde.internal.build.BuildScriptGenerator.generateFeatures(BuildScriptGenerator.java:276)
	at org.eclipse.pde.internal.build.BuildScriptGenerator.generate(BuildScriptGenerator.java:127)
	at org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:257)
	at org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation.run(FeatureBasedExportOperation.java:50)
	at org.eclipse.pde.internal.core.exports.SiteBuildOperation.run(SiteBuildOperation.java:66)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)


I tried to create a new Update Site Project and a new empty Feature Project, building fails with the same NullPointerException. 

How am I going to build my update site now? Is there a ANT build.xml file I can copy from somewhere?
Comment 1 Jan Rosczak CLA 2014-06-04 04:26:25 EDT
I debuged the code and the method isSatisfiedBy is invoked with the following supplier: "jnotify.dll; processor=x86; osname=win32". I am running on a x86_64 processor.

The platformProps variable contains "[{osgi.ws=win32, org.osgi.framework.os.name=win32,...}, {org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,CDC-1.0/Foundation-1.0, org.osgi.framework.system.packages=...},...]".

For the first entry everything is okay, but no match is found, because of the wrong processor type.

Then the same logic is run on the second entry and there is no org.osgi.framework.os.name property and therefore the variable platformOS is null, but this is nowhere taken into account leading to a collection with a single NULL element.
Comment 2 Curtis Windatt CLA 2014-06-04 09:33:38 EDT

*** This bug has been marked as a duplicate of bug 435407 ***