The felix-resolver does actually look for those Require-Capabilities and
throws an error if they can't be met.
Now karaf uses this resolver to resolve all features, and therefore will
run into the same issue when installing a feature as installing a bundle.

regards, Achim


2015-09-07 15:04 GMT+02:00 David Jencks <[email protected]>:

> I think you mean @Reference?
>
> I was a bit worried about including those Require-Capability for services,
> but the people on the spec committee  who understand resolving more than me
> said that it would not be used at runtime but only to sort of plan what set
> of bundles would be a good idea to run together.  I wouldn’t rule out this
> causing the NPE however.  Do you/Karaf have the latest felix resolver
> installed?
>
> BTW Felix DS includes a gogo and a normal shell command.   I wouldn’t
> think this would cause a restart — it seems to me that this would indicate
> a non-osgi-friendly console — but I don’t know how the karaf console is set
> up.
>
> hope you continue making progress :-)
>
> david jencks
>
> > On Sep 7, 2015, at 8:52 AM, Benson Margulies <[email protected]>
> wrote:
> >
> > David, I note that the use of an @Requirement leads to a
> > Require-Capability in the manifest. In one case, I need to consume a
> > service which is registered by a boring old Activator class in a
> > bundle I do not control, and which does not have the corresponding
> > Provide-Capability. I haven't seen a wiring error yet, but this may be
> > related to an NPE in the Karaf resolver that afflicts me.
> >
> >
> > On Sun, Sep 6, 2015 at 9:46 PM, Benson Margulies <[email protected]>
> wrote:
> >> So, the good news is that I read the spec, I followed you hints, and I
> >> converted a simple bundle of mine from blueprint to DS.
> >>
> >> The bad news is that Karaf 4.0.1 was unable to start up with a
> >> combination of aries-blueprint and scr enabled. I am going to see if
> >> the Karaf folks can give me a path through that before I try
> >> converting _all_ my services all at once.
>
>


-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master

Reply via email to