Cheung Brian
Cheung Brian

Reputation: 755

Cannot use Httpclient-osgi-4.5.2. Missing Requirements

I am developing a OSGi app using Apache Felix as runtime. I use Maven to download httpclient-osgi. I have installed the bundle in the framework. But it results in the following exception.

It seems that I am missing a bundle that exports org.apache.httpcomponents.httpclient. But I really have no idea which bundle would export that package.

org.osgi.framework.BundleException: Unable to resolve org.apache.httpcomponents.httpclient [3](R 3.0): missing requirement [org.apache.httpcomponents.httpclient [3](R 3.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.cm)(version>=1.3.0)(!(version>=2.0.0))) Unresolved requirements: [[org.apache.httpcomponents.httpclient [3](R 3.0)] osgi.wiring.package; (&(osgi.wiring.package=org.osgi.service.cm)(version>=1.3.0)(!(version>=2.0.0)))]
at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:998)
at org.apache.felix.framework.BundleImpl.start(BundleImpl.java:984)
at compilerMain.Main.main(Main.java:39)

Thank you for your response

Upvotes: 0

Views: 660

Answers (1)

Christian Schneider
Christian Schneider

Reputation: 19626

You are missing a bundle that exports that package org.osgi.service.cm. This means that httpclient needs the ConfigurationAdmin spec and possibly also a running instance. The easiest way to solve this is to install felix ConfigurationAdmin.

Upvotes: 4

Related Questions