I'm tracking down a rather odd problem trying to deploy a bundle into Karaf. The
issue appears to be with the osgi.enroute.dto.api package.

I'm getting this resolution error from Karaf:

missing requirement: osgi.wiring.package;
filter:="(&(osgi.wiring.package=osgi.enroute.dto.api)(version>=1.0.0)(!(version>=2.0.0)))"

So I don't have anything that provides the osgi.enroute.dto.api package.

I have the Karaf obr festure installed, and it's set up to point to 
https://raw.githubusercontent.com/osgi/osgi.enroute/v1.0.0/cnf/distro/index.xml

So I *think* it ought to just find whatever it needs by just looking in that
OBR. Nice.

Looking at the runbundles list in the bndrun file I have, it shows
"osgi.enroute.dto.bndlib.provider". At a guess this is where bndtools has
resolved that capability. Indeed, if I look at the MANIFEST for that jar, I see

Export-Package: osgi.enroute.dto.api;version="1.0.0"

If I use Karaf to list the information about that JAR though, it shows:
Requires:package:(&(package=osgi.enroute.dto.api)(version>=1.0.0)(!(version>=1.1.0)))
Karaf is just showing the information in the
https://raw.githubusercontent.com/osgi/osgi.enroute/v1.0.0/cnf/distro/index.xml
file here.

So, on the one hand, the osgi.enroute.dto.bndlib.provider.jar file says it
exports the package, but on the other hand the OBR index says that it has a
requirement on that package.

On the face of it, this seems like a contradiction. Indeed if I install that
bundle into Karaf, it complains of:
Unsatisfied Requirements:
[osgi.enroute.dto.bndlib.provider [60](R 60.0)] osgi.wiring.package;
(&(osgi.wiring.package=osgi.enroute.dto.api)(version>=1.0.0)(!(version>=1.1.0)))

Equally if I create a very simple bundle that just has:
   @Reference private osgi.enroute.dto.api.DTOs dtos;

I don't seem to be able to deploy it within Karaf, bundle:diag shows:

Unsatisfied Requirements:
[simple.dtousage [63](R 63.0)] osgi.wiring.package;
(&(osgi.wiring.package=osgi.enroute.dto.api)(version>=1.0.0)(!(version>=2.0.0)))
[simple.dtousage [63](R 63.0)] osgi.service;
(objectClass=osgi.enroute.dto.api.DTOs)


Is this an issue with the bundle? Or the bnd index? Or with karaf? 
Or am I misinterpreting? 

Thanks.

Reply via email to