Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 364567 - Improve diagnostics when Fragment-Host fails to resolve
Summary: Improve diagnostics when Fragment-Host fails to resolve
Status: CLOSED FIXED
Alias: None
Product: Virgo
Classification: RT
Component: runtime (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 enhancement (vote)
Target Milestone: 3.5.0.M01   Edit
Assignee: Glyn Normington CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-23 05:53 EST by Glyn Normington CLA
Modified: 2011-11-24 11:40 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Glyn Normington CLA 2011-11-23 05:53:16 EST
See bug 364003 for a suitable failure scenario and https://bugs.eclipse.org/bugs/show_bug.cgi?id=364003#c4 for the diagnostics produced. It was not obvious from the diagnostics that the Fragment-Host that could not be resolved contained a bundle version range for which there was no matching host.

Since this misled a user and I spent time in a debugger before I realised what was going on, the diagnostics should be improved.
Comment 1 Glyn Normington CLA 2011-11-24 11:20:36 EST
Beefed up the diagnostics, e.g.:

<DE0500E> Unable to install application from URI 'file:/Users/glynnormington/bugs/364567/virgo-kernel-3.1.0.BUILD-20111123111605/pickup/com.springsource.org.apache.xerces-2.8.1.jar'. Cannot satisfy constraints for bundle 'com.springsource.org.apache.xerces' version '2.8.1'. Cannot resolve: com.springsource.org.apache.xerces
    Resolver report:
        A Fragment-Host could not be resolved. The affected fragment is com.springsource.org.apache.xerces_2.8.1. Resolver error data <Fragment-Host: com.springsource.org.apache.xmlcommons; bundle-version="[1.3.3,1.3.3]">. Caused by missing constraint in bundle <com.springsource.org.apache.xerces_2.8.1>
             constraint: <Fragment-Host: com.springsource.org.apache.xmlcommons; bundle-version="[1.3.3,1.3.3]">
. org.eclipse.virgo.kernel.osgi.framework.UnableToSatisfyBundleDependenciesException: Unable to satisfy dependencies of bundle 'com.springsource.org.apache.xerces' at version '2.8.1': Cannot resolve: com.springsource.org.apache.xerces
    Resolver report:
        A Fragment-Host could not be resolved. The affected fragment is com.springsource.org.apache.xerces_2.8.1. Resolver error data <Fragment-Host: com.springsource.org.apache.xmlcommons; bundle-version="[1.3.3,1.3.3]">. Caused by missing constraint in bundle <com.springsource.org.apache.xerces_2.8.1>
             constraint: <Fragment-Host: com.springsource.org.apache.xmlcommons; bundle-version="[1.3.3,1.3.3]">

The problematic Fragment-Host version range is now present in the diagnostics, which should make them easier to understand if a little more verbose.
Comment 2 Glyn Normington CLA 2011-11-24 11:40:05 EST
Fixed in kernel commit 74e1f3d3c514ac7cbef0345d2864f1a619f2065e.