| Summary: | Unable to satisfy dependencies of bundle 'com.springsource.org.apache.xerces' | ||
|---|---|---|---|
| Product: | [RT] Virgo | Reporter: | borobudur Mising name <borobudur> |
| Component: | unknown | Assignee: | Glyn Normington <glyn.normington> |
| Status: | CLOSED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | glyn.normington |
| Version: | 3.0.1.RELEASE | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| URL: | http://www.eclipse.org/forums/index.php/t/261212/ | ||
| Whiteboard: | |||
See discussion in virgo forum: http://www.eclipse.org/forums/index.php/t/261212/ (In reply to comment #0) > Build Identifier: virgo-tomcat-server-3.0.1.RELEASE > > Can't start the following bundle from the spring bundle repository in the virgo > server: > > com.springsource.org.apache.xerces-2.8.1.jar > > > The depending two bundles are installed properly: > > com.springsource.org.apache.xml.resolver-1.2.0.jar > com.springsource.org.apache.xmlcommons-1.3.4.jar > > Reproducible: Always > > Steps to Reproduce: > 1.Pickup: com.springsource.org.apache.xmlcommons-1.3.4.jar > 2.Pickup: com.springsource.org.apache.xml.resolver-1.2.0.jar > 3.Pickup: com.springsource.org.apache.xerces-2.8.1.jar -> > UnableToSatisfyBundleDependenciesException Since the xerces bundle is a fragment of xmlcommons, it cannot be deployed successfully after xmlcommons is resolved since that is too late for the fragment to attach to its host. So this scenario is working as designed. I tried placing xerces and xml.resolver in repository/usr and then copying xmlcommons to pickup. xmlcommons was successfully deployed, but xerces was not attached as a fragment, contrary to what I expected. For completeness, I also tried placing xml.resolver and xmlcommons in repository/usr and then copying xerces to pickup. xerces would not resolve, with symptoms similar to those in comment 2: <DE0002E> Installation of bundle 'com.springsource.org.apache.xerces' version '2.8.1' failed. 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 ...etc. The next step is to debug the following method of DependencyCalculator:
private Set<BundleDescription> getNewImmediateDependencies(BundleDescription bundle, Collection<BundleDescription> newBundles) {
Set<BundleDescription> immediateDependencies = new HashSet<BundleDescription>();
immediateDependencies.addAll(Arrays.asList(bundle.getFragments()));
immediateDependencies.addAll(Arrays.asList(bundle.getResolvedRequires()));
immediateDependencies.addAll(getPackageProviders(bundle));
HostSpecification hostSpecification = bundle.getHost();
if (hostSpecification != null) {
for (BundleDescription host : hostSpecification.getHosts()) {
immediateDependencies.add(host);
}
}
immediateDependencies.retainAll(newBundles);
return immediateDependencies;
}
as this should detect fragment and host dependencies.
But first I will try to reproduce the issues using a kernel build as that will be more self-contained. (In reply to comment #3) > I tried placing xerces and xml.resolver in repository/usr and then copying > xmlcommons to pickup. xmlcommons was successfully deployed, but xerces was not > attached as a fragment, contrary to what I expected. This turns out to be working as designed because DependencyCalculator ignores fragments in the repository. If this function is needed, an enhancement bugzilla should be raised. (In reply to comment #4) > For completeness, I also tried placing xml.resolver and xmlcommons in > repository/usr and then copying xerces to pickup. xerces would not resolve, ... When I ran this under a debugger, DependencyCalculator. getNewImmediateDependencies appeared not to be called. Will try again tomorrow. I just noticed a basic issue: xerces 2.8.1 requires xmlcommons 1.3.3: Fragment-Host: com.springsource.org.apache.xmlcommons;bundle-version=" [1.3.3,1.3.3]" Repeating the tests with 1.3.3, shows that xerces can be deployed successfully with xmlcommons and xml.resolver in repository/usr: 74 RESOLVED com.springsource.org.apache.xerces_2.8.1 Master=76 75 ACTIVE com.springsource.org.apache.xml.resolver_1.2.0 76 ACTIVE com.springsource.org.apache.xmlcommons_1.3.3 Fragments=74 Deploying xmlcommons 1.3.3 with xerces and xml.resolver in repository/usr also works: 74 ACTIVE com.springsource.org.apache.xmlcommons_1.3.3 Fragments=75 75 RESOLVED com.springsource.org.apache.xerces_2.8.1 Master=74 76 ACTIVE com.springsource.org.apache.xml.resolver_1.2.0 Therefore closing this bug as invalid. (In reply to comment #7) > (In reply to comment #3) > > I tried placing xerces and xml.resolver in repository/usr and then copying > > xmlcommons to pickup. xmlcommons was successfully deployed, but xerces was not > > attached as a fragment, contrary to what I expected. > > This turns out to be working as designed because DependencyCalculator ignores > fragments in the repository. If this function is needed, an enhancement > bugzilla should be raised. This observation was incorrect. I realise now that DependencyCalculator does take into account the repository. The debug session with the wrong version of xmlcommons was simply misleading. (In reply to comment #4) > For completeness, I also tried placing xml.resolver and xmlcommons in > repository/usr and then copying xerces to pickup. xerces would not resolve, > with symptoms similar to those in comment 2: > > <DE0002E> Installation of bundle 'com.springsource.org.apache.xerces' version > '2.8.1' failed. > 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 > ...etc. Raised bug 364567 to improve the diagnostics as the current diagnostics give no hint that a matching host is not available. (In reply to comment #9) > I just noticed a basic issue: xerces 2.8.1 requires xmlcommons 1.3.3: > > Fragment-Host: com.springsource.org.apache.xmlcommons;bundle-version=" > [1.3.3,1.3.3]" > > Repeating the tests with 1.3.3, shows that xerces can be deployed successfully > with xmlcommons and xml.resolver in repository/usr: > > 74 RESOLVED com.springsource.org.apache.xerces_2.8.1 > Master=76 > 75 ACTIVE com.springsource.org.apache.xml.resolver_1.2.0 > 76 ACTIVE com.springsource.org.apache.xmlcommons_1.3.3 > Fragments=74 > > Deploying xmlcommons 1.3.3 with xerces and xml.resolver in repository/usr also > works: > > 74 ACTIVE com.springsource.org.apache.xmlcommons_1.3.3 > Fragments=75 > 75 RESOLVED com.springsource.org.apache.xerces_2.8.1 > Master=74 > 76 ACTIVE com.springsource.org.apache.xml.resolver_1.2.0 > > Therefore closing this bug as invalid. Thanks! Sorry for the trouble. |
Build Identifier: virgo-tomcat-server-3.0.1.RELEASE Can't start the following bundle from the spring bundle repository in the virgo server: com.springsource.org.apache.xerces-2.8.1.jar The depending two bundles are installed properly: com.springsource.org.apache.xml.resolver-1.2.0.jar com.springsource.org.apache.xmlcommons-1.3.4.jar Reproducible: Always Steps to Reproduce: 1.Pickup: com.springsource.org.apache.xmlcommons-1.3.4.jar 2.Pickup: com.springsource.org.apache.xml.resolver-1.2.0.jar 3.Pickup: com.springsource.org.apache.xerces-2.8.1.jar -> UnableToSatisfyBundleDependenciesException