You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Robert Munteanu <ro...@apache.org> on 2018/04/17 17:20:45 UTC
[feature model] Problems related to fragment bundles
Hi,
I've advanced in my tests of the feature model and now I have a problem
related to a fragment bundle. The most simplified feature that I have
is:
{
"id": "org.apache.sling.ide/org.apache.sling.ide.cli-dist/1.0.0",
"bundles": [
"org.apache.sling/org.apache.sling.fragment.xml/1.0.2"
]
}
Trying to start this via
$ java -cp ... org.apache.sling.feature.applicationbuilder.impl.Main -d features/ -u file:///home/robert/.m2/repository -o sling.json
results in a resolution error:
[INFO] Apache Sling Feature Application Builder
[INFO]
[ERROR] Problem generating application
java.lang.RuntimeException: java.lang.RuntimeException: org.osgi.service.resolver.ResolutionException: Unable to resolve BundleResourceImpl [bsn=org.apache.sling.fragment.xml, version=1.0.2]: missing requirement OSGiRequirement [resource=BundleResourceImpl [bsn=org.apache.sling.fragment.xml, version=1.0.2], namespace=osgi.wiring.host, attributes={bundle-version=0.0.0, osgi.wiring.host=system.bundle}, directives={filter=(&(osgi.wiring.host=system.bundle)(bundle-version>=0.0.0)), extension=framework}]
at org.apache.sling.feature.resolver.FrameworkResolver.orderResources(FrameworkResolver.java:140)
at org.apache.sling.feature.support.FeatureUtil.sortFeatures(FeatureUtil.java:245)
at org.apache.sling.feature.support.FeatureUtil.assembleApplication(FeatureUtil.java:285)
at org.apache.sling.feature.support.FeatureUtil.assembleApplication(FeatureUtil.java:233)
at org.apache.sling.feature.applicationbuilder.impl.Main.main(Main.java:166)
Caused by: java.lang.RuntimeException: org.osgi.service.resolver.ResolutionException: Unable to resolve BundleResourceImpl [bsn=org.apache.sling.fragment.xml, version=1.0.2]: missing requirement OSGiRequirement [resource=BundleResourceImpl [bsn=org.apache.sling.fragment.xml, version=1.0.2], namespace=osgi.wiring.host, attributes={bundle-version=0.0.0, osgi.wiring.host=system.bundle}, directives={filter=(&(osgi.wiring.host=system.bundle)(bundle-version>=0.0.0)), extension=framework}]
at org.apache.sling.feature.resolver.FrameworkResolver.internalOrderResources(FrameworkResolver.java:223)
at org.apache.sling.feature.resolver.FrameworkResolver.orderResources(FrameworkResolver.java:138)
... 4 more
Caused by: org.osgi.service.resolver.ResolutionException: Unable to resolve BundleResourceImpl [bsn=org.apache.sling.fragment.xml, version=1.0.2]: missing requirement OSGiRequirement [resource=BundleResourceImpl [bsn=org.apache.sling.fragment.xml, version=1.0.2], namespace=osgi.wiring.host, attributes={bundle-version=0.0.0, osgi.wiring.host=system.bundle}, directives={filter=(&(osgi.wiring.host=system.bundle)(bundle-version>=0.0.0)), extension=framework}]
at org.apache.felix.resolver.ResolutionError.toException(ResolutionError.java:42)
at org.apache.felix.resolver.ResolverImpl.doResolve(ResolverImpl.java:391)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:377)
at org.apache.felix.resolver.ResolverImpl.resolve(ResolverImpl.java:370)
at org.apache.sling.feature.resolver.FrameworkResolver.internalOrderResources(FrameworkResolver.java:176)
... 5 more
My understanding is that fragment bundles should be supported, or at
least they are mentioned in the code base . Is this a bug or am I
missing something?
Thanks,
Robert
Re: [feature model] Problems related to fragment bundles
Posted by David Bosschaert <da...@gmail.com>.
Hi Robert,
Yes fragment bundles should be supported. This fragment is a little special
in that it's a fragment to the system bundle, you identified a bug here.
Thanks for the fix in the pull request for that!
David
On 17 April 2018 at 22:38, Robert Munteanu <ro...@apache.org> wrote:
> On Tue, 2018-04-17 at 20:20 +0300, Robert Munteanu wrote:
> > Is this a bug or am I missing something?
>
> Under the assumption this is a bug :-) I filed a PR with the 'fixes'
> that I applied. Not sure the solution is the right one, but at least
> helps start a discussion.
>
> Robert
>
Re: [feature model] Problems related to fragment bundles
Posted by Robert Munteanu <ro...@apache.org>.
On Tue, 2018-04-17 at 20:20 +0300, Robert Munteanu wrote:
> Is this a bug or am I missing something?
Under the assumption this is a bug :-) I filed a PR with the 'fixes'
that I applied. Not sure the solution is the right one, but at least
helps start a discussion.
Robert