karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Baptiste Onofré (JIRA) <j...@apache.org>
Subject [jira] [Commented] (KARAF-3520) FeatureService fails to install feature in case of missing capability
Date Fri, 05 Jun 2015 12:36:01 GMT

    [ https://issues.apache.org/jira/browse/KARAF-3520?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14574428#comment-14574428
] 

Jean-Baptiste Onofré commented on KARAF-3520:
---------------------------------------------

After discussing with Guillaume, I would like to propose three points:
- in order to provide smooth backward compatibility, I propose to add feature.resolver.mode
in etc/org.apache.karaf.features.cfg. This property can contain strict or backward values.
Strict is the current behaviour: the features resolver checks requirements and capabilities
in order to install "extra" bundles. Backward ignores the OSGi service requirement and will
install the feature even if some service requirements are not satisfied.
- as a workaround, it's already possible to provide requirements and capabilities by hand
in the resolver (using dedicated commands). Those commands have to be documented as they provide
good flexibility and allow users to find their own workaround.
- the resolver error messages should be improved. If they can barely understandable by developers,
it's not easy for administrator. Imagine: I'm just responsible of the installation and administration
of Karaf. I deploy features and I got such kind of resolution errors. I don't really know
what's a requirement, a capability, or even an OSGi service ;) So we should be able to provide
more "human readable" error messages (for instance, something like "The foobar feature requires
this, but Karaf doesn't find bundles providing such kind of capability"). It means that we
should improve the Felix Resolver, or at least the Felix Resolver should throw a ResolverException
that we can handle to display "good" messages.

Thoughts ?

> FeatureService fails to install feature in case of missing capability
> ---------------------------------------------------------------------
>
>                 Key: KARAF-3520
>                 URL: https://issues.apache.org/jira/browse/KARAF-3520
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-feature
>    Affects Versions: 4.0.0.M1
>            Reporter: Achim Nierbeck
>            Priority: Critical
>             Fix For: 4.0.0
>
>
> If a bundle does contain a require-capability header for example like the following:

> {code}
> osgi.service; effective:=active; filter:="(objectClass=org.ops4j.pax.url.mvn.MavenResolver)"]]
> {code}
> but there is no bundle satisfying this capability the installation of this feature fails:

> {code}
> org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement
[root] osgi.identity; osgi.identity=mybundle; type=karaf.feature; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]";
filter:="(&(osgi.identity=mybundle)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))"
[caused by: Unable to resolve mybundle/1.0.0.SNAPSHOT: missing requirement [mybundle/1.0.0.SNAPSHOT]
osgi.identity; osgi.identity=com.my.package; type=osgi.bundle; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]";
resolution:=mandatory [caused by: Unable to resolve com.my.package/1.0.0.SNAPSHOT: missing
requirement [com.my.package/1.0.0.SNAPSHOT] osgi.service; effective:=active; filter:="(objectClass=org.ops4j.pax.url.mvn.MavenResolver)"]]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:285)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.processCandidates(Candidates.java:454)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populateResource(Candidates.java:266)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.Candidates.populate(Candidates.java:153)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:148)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.karaf.features.internal.region.SubsystemResolver.resolve(SubsystemResolver.java:186)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.karaf.features.internal.service.Deployer.deploy(Deployer.java:254)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl.doProvision(FeaturesServiceImpl.java:1028)[6:org.apache.karaf.features.core:4.0.0.M2]
> at org.apache.karaf.features.internal.service.FeaturesServiceImpl$1.call(FeaturesServiceImpl.java:929)[6:org.apache.karaf.features.core:4.0.0.M2]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)[:1.8.0_25]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)[:1.8.0_25]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)[:1.8.0_25]
> at java.lang.Thread.run(Thread.java:745)[:1.8.0_25]
> {code}
> The installation of the bundle works from the shell via a bundle:install without issues,
the resolving of the bundle also works. 
> The feature service should handle missing capabilities more graceful. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message