Hi Paul,

This is a different problem, in that where the previous requirement for the 
“osgi.service” namespace was an “active” time requirement (and therefore not 
enforced at runtime), this is a resolve time requirement that *will* prevent 
your bundles from resolving/starting in the framework. It is also the case that 
osgi.wiring.package namespace corresponds to the Import-Package part of your 
bundle manifest - your bundle uses types from the org.apache.http package and 
so you need to deploy a bundle which contains and exports that package. This is 
therefore not so much a small packaging bug, but either a significant 
dependency graph issue (the right bundle doesn’t end up in your index when it 
should) or a significant design issue (a core part of the API isn’t exported) 
in the HttpClient project.

As a separate question - is there a reason that you are trying to use the 
Apache HttpClient? OSGi enRoute makes use of the JAX-RS Whiteboard which 
includes a simple way to access the JAX-RS specification client implementation. 
If it’s possible for you to use the existing JAX-RS Client instead then you 
could avoid adding the duplicate function.

Best Regards,

Tim

> On 21 Jan 2019, at 05:56, Paul F Fraser via osgi-dev <osgi-dev@mail.osgi.org> 
> wrote:
> 
> Using the Apache httpclient-osgi bundle 
> https://mvnrepository.com/artifact/org.apache.httpcomponents/httpclient-osgi/4.5.6
>  in a (new) enRoute project I get this error-
> 
> [ERROR] Failed to execute goal 
> biz.aQute.bnd:bnd-export-maven-plugin:4.1.0:export (default) on project 
> qQNESiteAPP:
> Unable to resolve <<INITIAL>>: missing requirement 
> osgi.identity;filter:='(osgi.identity=net.qnenet.qnesite.qHttpClientImpl)'
> [caused by: Unable to resolve net.qnenet.qnesite.qHttpClientImpl 
> version=0.0.1.201901210415:
> missing requirement 
> osgi.wiring.package;filter:='(&(osgi.wiring.package=org.apache.http))'] -> 
> [Help 1]
> 
> Is this a similar problem to that discussed where Tim Ward stated -
> 
> "Now in fact the Felix Http Jetty implementation used in OSGi enRoute *does* 
> provide this service, however it is missing the metadata from the manifest 
> saying that it provides this service. This is a packaging bug in the Felix 
> Jetty bundle, and is why the resolve fails."
> 
> Checking the exports from the bundle, "org.apache.http" appears many times 
> but I cannot see a distinct export for that package although I could have 
> missed it.
> 
> Is there a problem with the apache httpclient for OSGi purposes?
> 
> Paul Fraser
> 
> _______________________________________________
> OSGi Developer Mail List
> osgi-dev@mail.osgi.org
> https://mail.osgi.org/mailman/listinfo/osgi-dev

_______________________________________________
OSGi Developer Mail List
osgi-dev@mail.osgi.org
https://mail.osgi.org/mailman/listinfo/osgi-dev

Reply via email to