3

I am trying out Karaf and installed some bundle X. This bundle X complains about a missing requirement: Unresolved requirements ... osgi.wiring.package; (osgi.wiring.package=org.apache.commons.httpclient)]

Hence, I tried to provide the org.apache.commons.httpclient through bundle:install mvn:commons-httpclient/commons-httpclient/3.1 which worked.

But, after trying to start the X again, I still get the same error message.

thanks!

2 Answers 2

7

That jar is not a bundle, hence can't be deployed to karaf, it's just ignored.

Try

karaf@root>bundle:install -s mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.commons-httpclient/3.1_7

Make it sure that your bundle has in their META-INF/MANIFEST.MF the osgi import declarations syntax. I assume that you use bndtools to generate the bundle.

4

Agree with @Antonio, for third party libraries which are not OSGi bundles you can also try to install them with wrap:

bundle:install -s wrap:mvn:commons-httpclient/commons-httpclient/3.1

This will create a basic OSGi MANIFEST for the library...

You can find more info here: https://karaf.apache.org/manual/latest/#_dynamically_wrapping_jars

2

Not the answer you're looking for? Browse other questions tagged or ask your own question.