Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 427523 - PDE headless product build NPE when used with multi-os spec Bundle-NativeCode.
Summary: PDE headless product build NPE when used with multi-os spec Bundle-NativeCode.
Status: CLOSED DUPLICATE of bug 435407
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 4.4   Edit
Hardware: PC Windows 8
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: pde-build-inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-05 16:46 EST by Tim Cook CLA
Modified: 2014-06-04 09:34 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tim Cook CLA 2014-02-05 16:46:16 EST
In 4.4M5 a headless product build throws the following NPE when used with Bundle-NativeCode. A change to NativeCodeSpecificationImpl.isSatisfiedBy() isn't accounting for osName (line 88) becoming null when the config specification is "configs=win32,win32,x86" and you have multiple osname's in the Bundle-NativeCode. This is due to platformOS returning null (line 73) because platformProps only contains "{org.osgi.framework.processor=x86, org.osgi.framework.os.name=win32, osgi.os=win32, osgi.arch=x86, osgi.ws=win32}" and "Linux" is missing due to the config specification.

Bundle-NativeCode: 
 native/linux/x86/libAjni.so;
   osname=Linux; processor=x86,
 native/linux/x86_64/libAjni.so;
   osname=Linux; processor=x86-64,
 native/windows/x86/hxAjni.dll;
   osname=Win32; processor=x86,
 native/windows/x86_64/hxAjni.dll;
   osname=Win32; processor=x86-64,
 native/windows/x86/hxAjni.dll;
   osname=Windows 8; processor=x86,
 native/windows/x86_64/hxAjni.dll;
   osname=Windows 8; processor=x86-64

Caused by: 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.PDEState.resolveState(PDEState.java:482)
	at org.eclipse.pde.internal.build.site.BuildTimeSite.getRegistry(BuildTimeSite.java:155)
	at org.eclipse.pde.internal.build.AbstractScriptGenerator.findFile(AbstractScriptGenerator.java:472)
	at org.eclipse.pde.internal.build.AbstractScriptGenerator.loadProduct(AbstractScriptGenerator.java:439)
	at org.eclipse.pde.internal.build.AbstractScriptGenerator.loadProduct(AbstractScriptGenerator.java:432)
	at org.eclipse.pde.internal.build.FeatureGenerator.initialize(FeatureGenerator.java:284)
	at org.eclipse.pde.internal.build.FeatureGenerator.generate(FeatureGenerator.java:137)
	at org.eclipse.pde.internal.build.tasks.FeatureGeneratorTask.run(FeatureGeneratorTask.java:55)
	at org.eclipse.pde.internal.build.tasks.FeatureGeneratorTask.execute(FeatureGeneratorTask.java:37)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292)
Comment 1 Curtis Windatt CLA 2014-06-04 09:34:27 EDT

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