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

Bug 327706

Summary: Headless build failure with Eclipse 3.6.1
Product: [Eclipse Project] PDE Reporter: Marco Maccaferri <macca>
Component: BuildAssignee: Andrew Niefer <aniefer>
Status: VERIFIED FIXED QA Contact:
Severity: major    
Priority: P3 CC: aniefer, curtis.windatt.public, david_williams, fredrik.attebrant, jacek.pospychala, jeffmcaffer, kai.toedter, markus.tiede, mobmail, pascal, peter, pwebster, s.schnabl, tom.seidel
Version: 3.6.1Flags: curtis.windatt.public: review+
Target Milestone: 3.6.2   
Hardware: PC   
OS: Linux   
Whiteboard:
Attachments:
Description Flags
My content.jar file
none
Assemble files
none
content.xml
none
assemble p2 file
none
patch none

Description Marco Maccaferri CLA 2010-10-13 14:55:46 EDT
Build Identifier: M20100909-0800

I have upgraded my build environment to use the latest Eclipse 3.6.1, however now the build fails with the following error:

      [java] Installing org.eclipsetrader.platform.workbench 1.0.0.v201010121058.
      [java] Installation failed.
      [java] An error occurred while collecting items to be installed
      [java]  session context was:(profile=SDKProfile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
      [java]  No repository found containing: osgi.bundle,org.apache.ant,1.7.1.v20090120-1145
      [java]  No repository found containing: osgi.bundle,org.eclipse.ant.core,3.2.101.v20091110_r352
      [java]  No repository found containing: osgi.bundle,org.eclipse.core.variables,3.2.200.v20090521
      [java]  No repository found containing: osgi.bundle,org.eclipse.equinox.concurrent,1.0.1.R35x_v20100209
      [java] Application failed, log file location: /home/marco/eclipse/configuration/1286873998424.log

The product doesn't need (nor includes) any of the listed plugins so why 
pde thinks that they are needed ? The log file mention on the last line doesn't exists so I don't know what happens.

PDE version is org.eclipse.pde.build_3.6.1.R36x_v20100823.

The same exact build script works well when using org.eclipse.pde.build_3.5.1.R35x_20090820.


Reproducible: Always
Comment 1 Kai Toedter CLA 2010-10-14 05:30:30 EDT
I see exactly the same behavior using Windows 7 32bit and Eclipse SDK 3.6.1. This could be related to https://bugs.eclipse.org/bugs/show_bug.cgi?id=312140 or https://bugs.eclipse.org/bugs/show_bug.cgi?id=313334

Here is my output:

     [java] runDirector:
     [java] [p2.director] Installing net.eclipsetraining.contacts.product.product 1.0.0.
     [java] [p2.director] Installation failed.
     [java] [p2.director] An error occurred while collecting items to be installed
     [java] [p2.director]  session context was:(profile=profile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
     [java] [p2.director]  No repository found containing: osgi.bundle,org.apache.ant,1.7.1.v20100518-1145
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.ant.core,3.2.200.v20100427
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.compare,3.5.100.I20100526-0800
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.compare.core,3.5.100.I20100526-0800
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.core.filebuffers,3.5.100.v20100520-0800
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.core.filesystem,1.3.1.R36x_v20100727-0745
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.core.net,1.2.100.I20100511-0800
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.core.resources,3.6.0.R36x_v20100825-0600
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.core.variables,3.2.400.v20100505
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.equinox.concurrent,1.0.100.v20100503
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.jface.text,3.6.1.r361_v20100825-0800
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.text,3.5.0.v20100601-1300
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.ui.editors,3.6.1.r361_v20100825-0800
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.ui.ide,3.6.1.M20100825-0800
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.ui.workbench.texteditor,3.6.1.r361_v20100714-0800
     [java] [p2.director] An error occurred while collecting items to be installed
     [java] [p2.director] session context was:(profile=profile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
     [java] [p2.director] No repository found containing: osgi.bundle,org.apache.ant,1.7.1.v20100518-1145
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.ant.core,3.2.200.v20100427
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.compare,3.5.100.I20100526-0800
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.compare.core,3.5.100.I20100526-0800
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.core.filebuffers,3.5.100.v20100520-0800
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.core.filesystem,1.3.1.R36x_v20100727-0745
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.core.net,1.2.100.I20100511-0800
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.core.resources,3.6.0.R36x_v20100825-0600
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.core.variables,3.2.400.v20100505
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.equinox.concurrent,1.0.100.v20100503
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.jface.text,3.6.1.r361_v20100825-0800
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.text,3.5.0.v20100601-1300
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.ui.editors,3.6.1.r361_v20100825-0800
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.ui.ide,3.6.1.M20100825-0800
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.ui.workbench.texteditor,3.6.1.r361_v20100714-0800
     [java] A problem occured while invoking the director.
     [java] BUILD FAILED
Comment 2 Andrew Niefer CLA 2010-10-15 14:50:09 EDT
Can someone attach the content.jar/xml (in ${p2.build.repo}, by default buildDirectory/buildRepo) from a build that sees this.  Also perhaps the generated assemble.*.p2.xml file from the buildDirectory.

Are these optional requirements for which we have metadata but not artifacts?
Comment 3 Andrew Niefer CLA 2010-10-18 08:57:37 EDT
Kai, you mentioned on your blog that org.eclipse.equinox.p2.ui.sdk introduced a dependency to org.eclipse.compare.

This suggests to me that this bug is just because some bundles changed dependencies and there is not actually any problem with PDE/Build.
Comment 4 Marco Maccaferri CLA 2010-10-18 09:53:33 EDT
Created attachment 181095 [details]
My content.jar file

Attached my content.jar file.
Comment 5 Marco Maccaferri CLA 2010-10-18 09:56:20 EDT
(In reply to comment #3)

> This suggests to me that this bug is just because some bundles changed
> dependencies and there is not actually any problem with PDE/Build.

That's not my case, I think. I forgot to mention, the target plugin set is the same 3.5.1 release in both cases, I'm just switching the build environment / pde (from 3.5.1 to 3.6.1).
Comment 6 Marco Maccaferri CLA 2010-10-21 03:28:43 EDT
Created attachment 181362 [details]
Assemble files
Comment 7 Tom Seidel CLA 2010-10-29 12:26:09 EDT
Same problem here: Just switched from 3.5 to 3.6.1 and got the same error. I can exclude the error Kai reported, because the required packages are included in the list of the created artifacts.

[java] [p2.director] Installation failed.
[java] [p2.director] An error occurred while collecting items to be installed
[java] [p2.director]  session context was:(profile=profile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
[java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.birt.report.designer.core,2.6.1.v20100902
[java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.birt.report.designer.ui,2.6.1.v20100902
[java] [p2.director] An error occurred while collecting items to be installed
[java] [p2.director] session context was:(profile=profile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
[java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.birt.report.designer.core,2.6.1.v20100902
[java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.birt.report.designer.ui,2.6.1.v20100902
Comment 8 Peter Severin CLA 2010-11-21 01:35:40 EST
I am trying to create product from scratch by following the steps from Plug-in Development Environment Guide. I have a successful build but as soon as a I set p2.gathering=true I get the following:


     [java] [p2.director] Installing com.wireframesketcher.standalone.product 2.1.2.
     [java] [p2.director] Installation failed.
     [java] [p2.director] An error occurred while collecting items to be installed
     [java] [p2.director]  session context was:(profile=profile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
     [java] [p2.director]  No repository found containing: osgi.bundle,org.eclipse.equinox.concurrent,1.0.100.v20100503
     [java] [p2.director] An error occurred while collecting items to be installed
     [java] [p2.director] session context was:(profile=profile, phase=org.eclipse.equinox.internal.p2.engine.phases.Collect, operand=, action=).
     [java] [p2.director] No repository found containing: osgi.bundle,org.eclipse.equinox.concurrent,1.0.100.v20100503
     [java] A problem occured while invoking the director.
Comment 9 Peter Severin CLA 2010-11-21 02:02:23 EST
Created attachment 183533 [details]
content.xml

Here's the content.xml file
Comment 10 Peter Severin CLA 2010-11-21 02:03:35 EST
Created attachment 183534 [details]
assemble p2 file

And the assemble.*.p2.xml file
Comment 11 Peter Severin CLA 2010-11-21 02:35:41 EST
I could solve this problem by leaving only 'plugins' and 'features' directories in target platform Eclipse install.
Comment 12 Marco Maccaferri CLA 2010-11-21 04:11:43 EST
(In reply to comment #11)
> I could solve this problem by leaving only 'plugins' and 'features' directories
> in target platform Eclipse install.

That did the trick for me too, I forgot to have all these extra files in the target platform folder. Thanks!
Comment 13 Pascal Rapicault CLA 2010-11-21 15:56:05 EST
I wonder if this was not caused by the resolver bug we uncovered a few weeks back. Ben / Andrew / Paul, would you mind trying with the I build from the 15th, or the most recent M build.
Comment 14 Andrew Niefer CLA 2010-11-22 12:08:10 EST
I'm noticing a problem in the assemble.p2.xml files attached by both Marco and Peter.  In particular, at the bottom is a "synchronization" mirror call which is supposed to ensure the build.repo has all the required extra pieces that weren't included directly in the product.

In both cases, we see the metadata from the target platform being included, 
(file:/home/marco/eclipse-platform-3.5/configuration/../p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformSDKProfile.profile/)
but we don't see the main artifact location 
(file:/home/marco/eclipse-platform-3.5)

So I'm guessing we are left with some optional IUs getting mirrored over, but end up missing the artifacts.

Marco or Peter, can you please attach the latest .profile file from under the target's /configuration/../p2/org.eclipse.equinox.p2.engine/profileRegistry/PlatformSDKProfile.profile/ folder.

And, also confirm that there exists a /home/marco/eclipse-platform-3.5/artifacts.xml file.
Comment 15 Peter Severin CLA 2010-11-22 12:12:44 EST
Andrew, I just unzip the latest 3.6.1 build of Eclipse and RCP delta pack during the build so all those files stay unmodified... unless you want those files as they are after a failed build?
Comment 16 Andrew Niefer CLA 2010-11-22 12:16:09 EST
I think I know the problem now, a fresh download and unzipped eclipse install that has not been run has cache properties "org.eclipse.equinox.p2.cache" with paths from the eclipse build machine.  These properties are updated the first time the install is run by the user.  Here, being used as a target, the install is never actually run, so these properties are not updated.

This leaves an incorrect path for the build and the main artifacts location does not get added.
Comment 17 Andrew Niefer CLA 2010-11-22 14:12:15 EST
Created attachment 183593 [details]
patch
Comment 18 Andrew Niefer CLA 2010-11-22 14:14:35 EST
Pascal can you please review this for 3.6.2
Comment 19 Andrew Niefer CLA 2010-11-23 16:27:16 EST
The attached patch was released to the 3.7 stream and is in 
http://download.eclipse.org/eclipse/downloads/drops/I20101123-0800/index.php
if someone wants to try it out.
Comment 20 Curtis Windatt CLA 2011-01-10 11:17:14 EST
Andrew, Pascal, is this something that there is strong 3.6.2 interest in?  RC builds start this week.
Comment 21 Curtis Windatt CLA 2011-01-11 15:03:18 EST
It would be great if some of people with issues can confirm that this fix solves their problems.

+1 for inclusion in 3.6.2.  RC1 builds start this week.
Comment 22 Andrew Niefer CLA 2011-01-11 15:07:09 EST
patch is released to 3.6.2
Comment 23 Curtis Windatt CLA 2011-01-20 15:53:03 EST
Verified that Andrew's fix is available in M20110119-0834.

Still would be very appreciated if one of the issue reporters could also verify.
Comment 24 Kai Toedter CLA 2011-02-28 04:19:41 EST
It works! I just updated my MP3 Manager PDE build to 3.6.2.

Thanks a lot.