Bug 237096 - Cryptic error attempting to build update site with jdt-feature
Summary: Cryptic error attempting to build update site with jdt-feature
Status: RESOLVED FIXED
Alias: None
Product: PDE
Classification: Eclipse Project
Component: Build (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 normal with 1 vote (vote)
Target Milestone: 3.4.1   Edit
Assignee: Andrew Niefer CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-13 11:08 EDT by Jerome Lanneluc CLA
Modified: 2008-07-28 10:56 EDT (History)
7 users (show)

See Also:


Attachments
patch (5.12 KB, patch)
2008-07-23 13:47 EDT, Andrew Niefer CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jerome Lanneluc CLA 2008-06-13 11:08:39 EDT
I20080612-2000

1. Start a new workspace
2. Check out org.eclipse.jdt
3. Check out org.eclipse.jdt-feature
2. New > Project > Update Site Project > Next > enter project name > Finish
3. Add Feature > select org.eclipse.jdt(3.4.0.qualifier) > OK
4. Press Build
Observe: You get an Error dialog:

Problems during export
  D:\temp\sdk\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\assemble.org.eclipse.pde.container.feature.win32.win32.x86.xml:98: The following error occurred while executing this line:
D:\temp\sdk\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\assemble.org.eclipse.pde.container.feature.win32.win32.x86.xml:126: An error occurred when calling generator.
  The following error occurred while executing this line:
D:\temp\sdk\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\assemble.org.eclipse.pde.container.feature.win32.win32.x86.xml:126: An error occurred when calling generator.
  D:\temp\sdk\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\assemble.org.eclipse.pde.container.feature.win32.win32.x86.xml:98: The following error occurred while executing this line:
D:\temp\sdk\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\assemble.org.eclipse.pde.container.feature.win32.win32.x86.xml:126: An error occurred when calling generator.
  The following error occurred while executing this line:
D:\temp\sdk\workspace\.metadata\.plugins\org.eclipse.pde.core\temp\org.eclipse.pde.container.feature\assemble.org.eclipse.pde.container.feature.win32.win32.x86.xml:126: An error occurred when calling generator.
Comment 1 Chris Aniszczyk CLA 2008-06-13 11:13:51 EDT
cc'ng Andrew for PDE Build awareness
Comment 2 Chris Aniszczyk CLA 2008-06-13 11:14:12 EDT
I think in this case, the .qualifier is causing an issue but we need more investigation first
Comment 3 Curtis Windatt CLA 2008-06-13 11:22:01 EDT
It is a NullPointerException occurring in the P2 Generator.  I need to investigate more to get the full stack trace (I don't have the source for org.eclipse.equinox.internal.p2.metadata.generator.ant.GeneratorTask), but this is where I had debugged to:

Thread [Worker-8] (Suspended)	
	GeneratorTask.execute() line: 45	
	UnknownElement.execute() line: 288	
	GeneratedMethodAccessor98.invoke(Object, Object[]) line: not available	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available	
	Method.invoke(Object, Object...) line: not available	
	DispatchUtils.execute(Object) line: 105	
	UnknownElement(Task).perform() line: 348	
	Target.execute() line: 357	
	Target.performTasks() line: 385	
	Project.executeSortedTargets(Vector) line: 1329	
	EclipseSingleCheckExecutor(SingleCheckExecutor).executeTargets(Project, String[]) line: 38	
	EclipseSingleCheckExecutor.executeTargets(Project, String[]) line: 30	
	Project.executeTargets(Vector) line: 1181	
	Ant.execute() line: 416	
	CallTarget.execute() line: 105	
	UnknownElement.execute() line: 288	
	GeneratedMethodAccessor98.invoke(Object, Object[]) line: not available	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available	
	Method.invoke(Object, Object...) line: not available	
	DispatchUtils.execute(Object) line: 105	
	UnknownElement(Task).perform() line: 348	
	Target.execute() line: 357	
	Target.performTasks() line: 385	
	Project.executeSortedTargets(Vector) line: 1329	
	Project.executeTarget(String) line: 1298	
	EclipseDefaultExecutor(DefaultExecutor).executeTargets(Project, String[]) line: 41	
	EclipseDefaultExecutor.executeTargets(Project, String[]) line: 32	
	Project.executeTargets(Vector) line: 1181	
	InternalAntRunner.run(List) line: 623	
	InternalAntRunner.run() line: 456	
	NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]	
	NativeMethodAccessorImpl.invoke(Object, Object[]) line: not available	
	DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: not available	
	Method.invoke(Object, Object...) line: not available	
	AntRunner.run(IProgressMonitor) line: 378	
	SiteBuildOperation(FeatureExportOperation).runScript(String, String[], Map, IProgressMonitor) line: 355	
	SiteBuildOperation(FeatureExportOperation).doExport(String, String, String, String, String, String, IProgressMonitor) line: 237	
	SiteBuildOperation(FeatureBasedExportOperation).run(IProgressMonitor) line: 46	
	BuildSiteJob(FeatureExportJob).run(IProgressMonitor) line: 55	
	BuildSiteJob.run(IProgressMonitor) line: 57	
	Worker.run() line: 55	
Comment 4 Curtis Windatt CLA 2008-06-13 11:25:16 EDT
Got it:

[org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator.generateNativeIUs(Generator.java:989), org.eclipse.equinox.internal.provisional.p2.metadata.generator.Generator.generate(Generator.java:316), org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication.generate(EclipseGeneratorApplication.java:379), org.eclipse.equinox.internal.p2.metadata.generator.EclipseGeneratorApplication.run(EclipseGeneratorApplication.java:363), org.eclipse.equinox.internal.provisional.p2.metadata.generator.IncrementalGenerator.run(IncrementalGenerator.java:43), org.eclipse.equinox.internal.p2.metadata.generator.ant.GeneratorTask.execute(GeneratorTask.java:38), org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288), sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source), sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source), java.lang.reflect.Method.invoke(Unknown Source), org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105), org.apache.tools.ant.Task.perform(Task.java:348), org.apache.tools.ant.Target.execute(Target.java:357), org.apache.tools.ant.Target.performTasks(Target.java:385), org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329), org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38), org.eclipse.ant.internal.core.ant.EclipseSingleCheckExecutor.executeTargets(EclipseSingleCheckExecutor.java:30), org.apache.tools.ant.Project.executeTargets(Project.java:1181), org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:416), org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105), org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288), sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source), sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source), java.lang.reflect.Method.invoke(Unknown Source), org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105), org.apache.tools.ant.Task.perform(Task.java:348), org.apache.tools.ant.Target.execute(Target.java:357), org.apache.tools.ant.Target.performTasks(Target.java:385), org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329), org.apache.tools.ant.Project.executeTarget(Project.java:1298), org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41), org.eclipse.ant.internal.core.ant.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32), org.apache.tools.ant.Project.executeTargets(Project.java:1181), org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:623), org.eclipse.ant.internal.core.ant.InternalAntRunner.run(InternalAntRunner.java:456), sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method), sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source), sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source), java.lang.reflect.Method.invoke(Unknown Source), org.eclipse.ant.core.AntRunner.run(AntRunner.java:378), org.eclipse.pde.internal.core.exports.FeatureExportOperation.runScript(FeatureExportOperation.java:355), org.eclipse.pde.internal.core.exports.FeatureExportOperation.doExport(FeatureExportOperation.java:237), org.eclipse.pde.internal.core.exports.FeatureBasedExportOperation.run(FeatureBasedExportOperation.java:46), org.eclipse.pde.internal.ui.build.FeatureExportJob.run(FeatureExportJob.java:55), org.eclipse.pde.internal.ui.build.BuildSiteJob.run(BuildSiteJob.java:57), org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)]
Comment 5 Curtis Windatt CLA 2008-06-13 12:45:43 EDT
When building JDT, the info passed to the P2 generator specifies a launcher configuration (win32_win32_x86).  But it does not specify an executable location, resulting in an NPE.  I don't know why JDT specifies a launcher configuration, as I didn't think anything in JDT was platform specific.

Moving to P2 for comment.
Comment 6 Andrew Niefer CLA 2008-06-16 17:15:44 EDT
This comes out of the fact the the jdt feature contributes rootfiles.
See bug 220553, we really should be generating root artifacts for this.

In the meantime we should just avoid the NPE and skip the rootfiles.  (rootfiles in metadata generation currently only work together with an eclipse.exe)
Comment 7 Miles Parker CLA 2008-06-26 18:46:52 EDT
Folks, I'm getting this in a very different context.(In reply to comment #5)
> When building JDT, the info passed to the P2 generator specifies a launcher
> configuration (win32_win32_x86).  But it does not specify an executable
> location, resulting in an NPE.  I don't know why JDT specifies a launcher
> configuration, as I didn't think anything in JDT was platform specific.

I don't know if this is helpful or not, but II understand you correctly this isn't the case. There is ...launching.macosx. An unfortunate issue is that the jdt.apt stuff requires J2SE1.6. As Apple doesn't have (will never have?) a JDK 1.6 for early Intel processors this means that there is always an issue validating plugins on such machines (my development machine for one..) 

I don't know if this feeds into anything but I have been having the same recurring issue :( when I do feature builds but it is has been somewhat inconsistent. Any ideas for fixes and/or workarounds?
Comment 8 Pascal Rapicault CLA 2008-07-02 13:56:43 EDT
Let's investigate for 3.4.1.

As a workaround, it should be possible to export the feature without generating p2 metadata and do the generation after the fact using the metadata generator.
Comment 9 Miles Parker CLA 2008-07-18 20:11:41 EDT
I've tried the metadata builder and after spending a fair amount of time trying to get it working w/o success I'm going to have to stick w/ the non p2 repos for now and take the performance hit. As a one-man show its hard to be a rel engineer as well. :D So here's one vote for this bug.
Comment 10 Andrew Niefer CLA 2008-07-23 13:33:59 EDT
Fixed in HEAD & 3.4.1

Tests are in org.eclipse.pde.build.tests in HEAD

Comment 11 Andrew Niefer CLA 2008-07-23 13:35:54 EDT
Note that metadata is generated for the rootfiles in the existing manner used for product rootfiles.  However, update site build from the UI does not publish artifacts because it is done in-place, so the rootfile artifacts are not built in this case.  They are built in headless scenarios.
Comment 12 Andrew Niefer CLA 2008-07-23 13:47:04 EDT
Created attachment 108238 [details]
patch

This was the patch
Comment 13 Miles Parker CLA 2008-07-26 16:48:52 EDT
A little OT but I can't find an interim update test site for platform / p2. Do we need to install entire Eclipse platform to test? 
Comment 14 Patrick Godeau CLA 2008-07-28 10:17:47 EDT
On which Eclipse build is the patch available please?
Comment 15 Curtis Windatt CLA 2008-07-28 10:56:12 EDT
(In reply to comment #14)
> On which Eclipse build is the patch available please?
> 

The patch was added to HEAD on the 23rd, so any nightly build after then should have it.  The next integration build is tomorrow (July 29th), and should include the fix.