Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 321997 - P2 Publisher applications hide the exception which caused the ERROR result status
Summary: P2 Publisher applications hide the exception which caused the ERROR result st...
Status: CLOSED FIXED
Alias: None
Product: Equinox
Classification: Eclipse Project
Component: p2 (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: P2 Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-06 10:53 EDT by Katya Stoycheva CLA
Modified: 2010-11-02 17:40 EDT (History)
3 users (show)

See Also:


Attachments
If the result contains a causing exception, it is shown together with the result. There is a separate message stating with which arguments the application was run. (3.78 KB, patch)
2010-08-06 10:54 EDT, Katya Stoycheva CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Katya Stoycheva CLA 2010-08-06 10:53:14 EDT
Build Identifier: I20100406-1034

When the publishing process ends with a result status which is different than OK (i.e. a successful execution), the result is usually printed in the standard output. Usually, the result description gives no hint about the point of failure which may require the scenario to be debugged closely in order to ascertain the cause for failure. This behavior is common to all p2 publisher applications that extend from org.eclipse.equinox.p2.publisher. AbstractPublisherApplication, including the p2 product publisher and p2 features and bundles publisher.


Reproducible: Always

Steps to Reproduce:
One of the scenarios when the issue pops up is described in bug #275372

1. In Eclipse IDE 3.6, run P2 product publisher application with configured standard parameters but omitting the “flavor” parameter, e.g.:
-metadataRepository file:///D:/tools (url to an existing repository)
-artifactRepository file:///D:/tools (url to an existing repository)
-productFile d:/file.product (file path to a standard product file)
-append
2. Observe the output which contains the result without giving a link between the missing input parameter and the shown AssertionFailedException:
Status ERROR: org.eclipse.equinox.p2.artifact.repository code=0 null argument: org.eclipse.core.runtime.AssertionFailedException: null argument:
Comment 1 Katya Stoycheva CLA 2010-08-06 10:54:08 EDT
Created attachment 176045 [details]
If the result contains a causing exception, it is shown together with the result. There is a separate message stating with which arguments the application was run.

Sample output for the scenario above:
Status ERROR: org.eclipse.equinox.p2.artifact.repository code=0 null argument:the name of provided capability org.eclipse.equinox.p2.flavor is not defined org.eclipse.core.runtime.AssertionFailedException: null argument:the name of provided capability org.eclipse.equinox.p2.flavor is not defined

Product publishing ended with the following exception:
org.eclipse.core.runtime.AssertionFailedException: null argument:the name of provided capability org.eclipse.equinox.p2.flavor is not defined
	at org.eclipse.core.runtime.Assert.isNotNull(Assert.java:85)
	at org.eclipse.equinox.internal.p2.metadata.ProvidedCapability.<init>(ProvidedCapability.java:33)
	at org.eclipse.equinox.p2.metadata.MetadataFactory.createProvidedCapability(MetadataFactory.java:424)
	at org.eclipse.equinox.p2.publisher.eclipse.BundlesAction.createDefaultBundleConfigurationUnit(BundlesAction.java:334)
	at org.eclipse.equinox.p2.publisher.eclipse.DefaultCUsAction.generateDefaultConfigIU(DefaultCUsAction.java:45)
	at org.eclipse.equinox.p2.publisher.eclipse.DefaultCUsAction.perform(DefaultCUsAction.java:35)
	at org.eclipse.equinox.p2.publisher.eclipse.ProductAction.perform(ProductAction.java:91)
	at org.eclipse.equinox.p2.publisher.Publisher$ArtifactProcess.run(Publisher.java:207)
	at org.eclipse.equinox.internal.p2.artifact.repository.simple.SimpleArtifactRepository.executeBatch(SimpleArtifactRepository.java:1032)
	at org.eclipse.equinox.p2.publisher.Publisher.publish(Publisher.java:231)
	at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.run(AbstractPublisherApplication.java:300)
	at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.run(AbstractPublisherApplication.java:270)
	at org.eclipse.equinox.p2.publisher.AbstractPublisherApplication.start(AbstractPublisherApplication.java:332)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.equinox.internal.app.AnyThreadAppLauncher.run(AnyThreadAppLauncher.java:26)
	at java.lang.Thread.run(Unknown Source)
Comment 2 Pascal Rapicault CLA 2010-11-02 17:40:35 EDT
Fix released in HEAD