Community
Participate
Working Groups
I try to export a feature. The error occures if I try build the UpdateSite or export the feature. !ENTRY org.eclipse.core.jobs 4 2 2014-05-21 16:10:51.455 !MESSAGE An internal error occurred during: "Build Site". !STACK 0 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)
Created attachment 243348 [details] System info
Created attachment 243377 [details] Screenshot
*** Bug 436540 has been marked as a duplicate of this bug. ***
*** Bug 427523 has been marked as a duplicate of this bug. ***
This will likely be difficult to track down as the problem occurs inside the OSGi State (which is essentially deprecated).
If this OSGi State is deprecated, what are we supposed to use to build an update site from within the Eclipse IDE (I am aware of Ant P2 Tasks and Maven Tycho)?
(In reply to Jan Rosczak from comment #6) > If this OSGi State is deprecated, what are we supposed to use to build an > update site from within the Eclipse IDE (I am aware of Ant P2 Tasks and > Maven Tycho)? PDE will continue to use the OSGi State for the forseeable future. The effort to move to the new OSGi resolver would be substantial and is not planned for any specific release at this time. The fact that the OSGi State is no longer under development will make investigating and fixing this bug more difficult, but we still want to investigate it.
Thanks for taking the time to fix this. Maybe may investigation as described in Bug 436540 could help. It seems that in the code one would only need to be prepared that the variable platformOS can be null and maybe add a "continue" statement to process the next entry in the list as was done in the old code of the 3.8 version.
*** Bug 438493 has been marked as a duplicate of this bug. ***
I am getting the same problem that was reported in 438493. My log file shows three errors are logged whenever I run the product export wizard. The first two are identical, and the following: !ENTRY org.eclipse.pde.build 4 1 2014-07-02 11:16:33.109 !MESSAGE Problems parsing the feature file:C:/Tools/eclipse-luna-4.4/features/org.eclipse.equinox.sdk_3.10.0.v20140606-1602/feature.xml. !STACK 1 org.eclipse.core.runtime.CoreException: Problems parsing the feature file:C:/Tools/eclipse-luna-4.4/features/org.eclipse.equinox.sdk_3.10.0.v20140606-1602/feature.xml. at org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.parseBuildFeature(BuildTimeFeatureFactory.java:85) at org.eclipse.pde.internal.build.site.BuildTimeFeatureFactory.createFeature(BuildTimeFeatureFactory.java:50) at org.eclipse.pde.internal.build.site.BuildTimeSite.createFeature(BuildTimeSite.java:472) at org.eclipse.pde.internal.build.site.compatibility.FeatureReference.getFeature(FeatureReference.java:39) at org.eclipse.pde.internal.build.site.BuildTimeSite.resolveFeatureReferences(BuildTimeSite.java:330) at org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:299) at org.eclipse.pde.internal.build.site.BuildTimeSite.findFeature(BuildTimeSite.java:291) at org.eclipse.pde.internal.build.BuildScriptGenerator.generateFeatures(BuildScriptGenerator.java:252) 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.ProductExportOperation.run(ProductExportOperation.java:106) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54) Contains: Invalid ID "org.eclipse.equinox.p2.sdk" or version "null" encountered. Contains: Invalid ID "org.eclipse.equinox.p2.core.feature" or version "null" encountered. Contains: Invalid ID "org.eclipse.equinox.p2.extras.feature" or version "null" encountered. Contains: Invalid ID "org.eclipse.equinox.p2.rcp.feature" or version "null" encountered. Contains: Invalid ID "org.eclipse.core.runtime.feature" or version "null" encountered. Contains: Error parsing feature: "require" must include at least one "import" element. !SUBENTRY 1 org.eclipse.equinox.p2.publisher.eclipse 4 17 2014-07-02 11:16:33.109 !MESSAGE Problems parsing the feature file:C:/Tools/eclipse-luna-4.4/features/org.eclipse.equinox.sdk_3.10.0.v20140606-1602/feature.xml. !SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2014-07-02 11:16:33.109 !MESSAGE Invalid ID "org.eclipse.equinox.p2.sdk" or version "null" encountered. !SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2014-07-02 11:16:33.109 !MESSAGE Invalid ID "org.eclipse.equinox.p2.core.feature" or version "null" encountered. !SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2014-07-02 11:16:33.109 !MESSAGE Invalid ID "org.eclipse.equinox.p2.extras.feature" or version "null" encountered. !SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2014-07-02 11:16:33.109 !MESSAGE Invalid ID "org.eclipse.equinox.p2.rcp.feature" or version "null" encountered. !SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2014-07-02 11:16:33.109 !MESSAGE Invalid ID "org.eclipse.core.runtime.feature" or version "null" encountered. !SUBENTRY 2 org.eclipse.equinox.p2.publisher.eclipse 4 17 2014-07-02 11:16:33.109 !MESSAGE Error parsing feature: "require" must include at least one "import" element. When I look at the feature.xml file for the org.eclipse.equinox.sdk feature I see the five Invalid IDs above at the bottom where they are listed as required features: <requires> <feature id="org.eclipse.equinox.p2.sdk"/> <feature id="org.eclipse.equinox.p2.core.feature"/> <feature id="org.eclipse.equinox.p2.extras.feature"/> <feature id="org.eclipse.equinox.p2.rcp.feature"/> <feature id="org.eclipse.core.runtime.feature"/> </requires> I don't know if this is relevant or not, but I do not seem to have two of these installed in my eclipse features directory. Specifically, org.eclipse.equinox.p2.sdk and org.eclipse.core.runtime.feature are nowhere to be found. I checked the luna update sites and don't see anything that I neglected to install. Are these two missing features somehow breaking the export wizard?
I would suggest that if developers are unable use the product export wizard for their RCP applications, then this is a rather critical bug and should not be deferred until the next major release (4.5). It should be a priority to get it fixed in 4.4.1.
(In reply to Gary C from comment #11) > I would suggest that if developers are unable use the product export wizard > for their RCP applications, then this is a rather critical bug and should > not be deferred until the next major release (4.5). It should be a priority > to get it fixed in 4.4.1. Yes, depending on what the fix looks like, it should be backported to 4.4.1.
Bug 438493, which has been marked as a duplicate of this bug, seems to be somewhat different, even though it also involves a NullPointerException. The stack trace is different and no features are involved. This bug keeps me from deploying any of my RCP applications, which is serious. Hopefully it will get fixed as soon as possible and at least in 4.4.1.
The bug below, closed as a duplicate of this bug, offers a recipe for reproducing this defect. Bug 427523 - PDE headless product build NPE when used with multi-os spec Bundle-NativeCode. We had such multi-os BundleNativeCode entries in the similar case I filed in bug 440154.
No one seems to be working on this. Is Bug 438652 related? It also has a NullPointerException involving the line: org.eclipse.osgi.internal.module.ResolverImpl.isResolvable(ResolverImpl.java:285) and involves Exporting.
This is planned for 441 and I will look at it for 4.4.1 and port to 4.5
Can you please attach the feature the export of which is currently not working?
With the information I have, I cant recreate this. If there are any issues, please attach the relevant project and provide steps to recreate it. Please feel free to reopen this with project file + steps.
Reopening as there have been 3 duplicates as well as a blocking bug. Clearly this is happening. Did you check the other duplicates for steps to reproduce?
(In reply to Vikas Chandra from comment #18) > With the information I have, I cant recreate this. If there are any issues, > please attach the relevant project and provide steps to recreate it. > > Please feel free to reopen this with project file + steps. I can't attach my project because it contains proprietary information, but it is an RCP application originally created with Eclipse 3.7. It has not been migrated to the new e4 tools, so I am using the compatibility layer. Also, I use the 64-bit version of Java 1.7, and the 64-bit Windows version of Eclipse. I am able to use the product export wizard in Eclipse 4.3, but I cannot use it in Eclipse 4.4 due to this issue.
To reproduce the bug, you need a plugin using Bundle-NativeCode in the manifest file. As already written in other comments, the 'platformOS' in org.eclipse.osgi.internal.resolver.NativeCodeSpecificationImpl.isSatisfiedBy can be null: For example the 'platformProp'= { org.osgi.framework.executionenvironment=OSGi/Minimum-1.0,OSGi/Minimum-1.1,CDC-1.0/Foundation-1.0, org.osgi.framework.system.packages=javax.microedition.io } has no entry for OS_NAME (org.osgi.framework.os.name), so 'platformOS'= null. The code in isSatisfiedBy does not check for null => NPE in line 88
In NativeCodeSpecificationImpl line 112 should be modified from platformProcessorAliases = Collections.singletonList(platformProcessor); to platformProcessorAliases = platformProcessor == null ? Collections.emptyList() : Collections.singleton(platformProcessor); This change is already there in 4.5. It needs to ported back to 4.4.1 Also for 64 bit eclipse, processor=x86_64 should be used.
Created attachment 246353 [details] Project to recreate To recreate ( on 64 bit eclipse only) 1) Import npe.zip 2) Open feature.xml in project FP 3) On overview page, click on Export Wizard in export section. NPE as mentioned on this bug will be recreated.
(In reply to Vikas Chandra from comment #22) > In NativeCodeSpecificationImpl > > line 112 should be modified from > > platformProcessorAliases = Collections.singletonList(platformProcessor); > > to > > platformProcessorAliases = platformProcessor == null ? > Collections.emptyList() : Collections.singleton(platformProcessor); > > This change is already there in 4.5. It needs to ported back to 4.4.1 > > Also for 64 bit eclipse, processor=x86_64 should be used. Has anyone tried to reproduce this on the latest SR1 build? This has already been fixed in SR1 with bug 438652.
See previous comment. It is fixed. Verified in eclipse-standard-luna-SR1-RC1-win32-x86_64 *** This bug has been marked as a duplicate of bug 438652 ***
Seems to be working in 4.4.1. Thanks.