0

If I add

<bundle>mvn:org.apache.camel/camel-http4/2.15.1</bundle>

Then I get the following error below.

What is the right way to be able to use camel-http4 from within my blueprint camel routing within Karaf? How should I modify features.xml?

org.osgi.service.resolver.ResolutionException: Unable to resolve root: missing requirement [root] osgi.identity; osgi.identity=social_importer.kar; type=karaf.feature; version="[1.0.0.SNAPSHOT,1.0.0.SNAPSHOT]"; filter:="(&(osgi.identity=social_importer.kar)(type=karaf.feature)(version>=1.0.0.SNAPSHOT)(version<=1.0.0.SNAPSHOT))" [caused by: Unable to resolve social_importer.kar/1.0.0.SNAPSHOT: missing requirement [social_importer.kar/1.0.0.SNAPSHOT] osgi.identity; osgi.identity=org.apache.camel.camel-http4; type=osgi.bundle; version="[2.15.1,2.15.1]"; resolution:=mandatory [caused by: Unable to resolve org.apache.camel.camel-http4/2.15.1: missing requirement [org.apache.camel.camel-http4/2.15.1] osgi.wiring.package; filter:="(&(osgi.wiring.package=javax.servlet)(version>=2.5.0)(!(version>=4.0.0)))"]]


Thanks, so far I have discovered with your help the following helps, still investigating.

karaf@root()> feature:repo-add mvn:org.apache.camel.karaf/apache-camel/2.15.2/xml/features
Adding feature url mvn:org.apache.camel.karaf/apache-camel/2.15.2/xml/features
karaf@root()> feature:install camel-http4
karaf@root()> feature:install camel-http
karaf@root()> feature:install camel-ahc
Phil
  • 46,436
  • 33
  • 110
  • 175

1 Answers1

1

You can install the Camel components from the karaf shell using

features:install camel-http4

That install all the bundles of the feature needed for using camel-http4. And after doing this once, you can install your own bundles.

If you have your own features.xml file, you can refer to other features with

<feature>camel-http4</feature>

And you may need in the top of your features.xml file to refer to the Camel features, such as Camel does to others here: https://github.com/apache/camel/blob/master/platforms/karaf/features/src/main/resources/features.xml#L20

Claus Ibsen
  • 56,060
  • 7
  • 50
  • 65
  • In Karaf version 3.0.3 - feature:install camel-http4 does not work. karaf@root()> feature:install camel-http4 Error executing command: No feature matching camel-http4/0.0.0 In Karaf 4 it fails silently. Also in Karaf 2 fails. (Windows) – Phil May 15 '15 at 13:54
  • I just discovered if I do features:addurl https://raw.githubusercontent.com/apache/camel/master/platforms/karaf/features/src/main/resources/features.xml it helps, not exactly, I need the real url.... not the git one – Phil May 15 '15 at 14:05
  • You need to install Camel in Karaf. There is some docs here: http://camel.apache.org/karaf.html - and plenty others if you google a bit – Claus Ibsen May 16 '15 at 13:34
  • Yes, thanks!. Um. I want my app to install Camel so that the user of Karaf doesn't need to do anything, I will keep reading docs to try to find out how. – Phil May 17 '15 at 06:28