karaf-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christian Schneider <ch...@die-schneider.net>
Subject Re: Problem with Karaf 4 feature installation
Date Tue, 23 May 2017 10:14:11 GMT
The requirements are solved purely with the Provide-Capability headers of
the bundles. It does not matter if bundle A actually provides such a
service. The important thing is that bundle A has a suitable
Provide-Capabilitiy Manifest header to announce it will provide a suitable
service. If this is not the case then you should make sure the header is
added. If you can not change the bundle then you can also add the
capability in the feature.


2017-05-23 10:44 GMT+02:00 Martin Lichtin <lichtin@yahoo.com>:

> I'm in the process of moving a system from Karaf 3 to 4.0. The 4.0
> 'features' changes turn out to be quite painful to upgrade..
> In particulur, with Pax-Exam, I have a situation with a feature B, where
> bundle B requires a service from bundle A, from feature A:
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="B">
>   <repository>mvn:grp/artifact-A/1.0/xml/features</repository>
>     <feature name="B">
>         <feature prerequisite="true">A</feature>
>         <bundle>mvn:grp/bundle-B/1.0</bundle>
>     </feature
> </features>
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="A">
>     <feature prerequisite="true">aries-blueprint</feature>
>     <feature prerequisite="true">deployer</feature>
>     <feature name="A">
>         <bundle>blueprint:mvn:grp/bundle-A/1.0/xml/idA</bundle>
>     </feature
> </features>
> The location and name of feature "B" is provided to Pax-Exam to install it.
> What is puzzling is that I see how the "blueprint" XML file is downloaded
> and the BlueprintURLHandler
> seems to kick in, but at about the same time the Resolver throws a
> "missing requirement"
> regarding bundle-B missing the service that bundle-A is about to provide.
> At this time, blueprint bundle-A has not been fully activated yet.
> But should not the prerequisite=true assure that services from bundle A
> are all visible
> before bundle B is installed and resolved?
> In another, similar situation it seems to work, so perhaps the special
> "blueprint:" loader is an issue?
> Any other ideas how to better debug? I turn on org.apache.karaf TRACE but
> no real info comes out.
> - Martin

Christian Schneider

Open Source Architect

View raw message