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!

Jonathan Eustace
  • 2,469
  • 12
  • 31
  • 54
user3612643
  • 5,096
  • 7
  • 34
  • 55

2 Answers2

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.

Achim Nierbeck
  • 5,265
  • 2
  • 14
  • 22
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: http://karaf.apache.org/manual/latest/developers-guide/creating-bundles.html

Jorge Martinez
  • 1,221
  • 8
  • 16