camel-http4 with toD does not working on karaf runtime

Solution Verified - Updated -

Issue

Sample Camel Route

<route id="cbr-route">
  <from id="_from1" uri="timer:timerName?repeatCount=1"/>
  <setHeader headerName="myurl" id="_setHeader1">
    <constant>www.redhat.com/en</constant>
  </setHeader>
  <toD id="_toD1" uri="http4://${header.myurl}"/>
  <log id="_log1" message="Done processing"/>
</route>

Issue
camel-http4 with toD fails with following error log.

java.lang.IllegalArgumentException: Cannot find endpoint with scheme http4
at org.apache.camel.runtimecatalog.AbstractCamelCatalog.endpointProperties(AbstractCamelCatalog.java:543) ~[!/:2.23.2.fuse-7_11_0-00037-redhat-00001]
at org.apache.camel.http.common.HttpSendDynamicAware.prepare(HttpSendDynamicAware.java:58) ~[?:?]
at org.apache.camel.processor.SendDynamicProcessor.process(SendDynamicProcessor.java:118) ~[!/:2.23.2.fuse-7_11_0-00037-redhat-00001]
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:548) [!/:2.23.2.fuse-7_11_0-00037-redhat-00001]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [!/:2.23.2.fuse-7_11_0-00037-redhat-00001]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:138) [!/:2.23.2.fuse-7_11_0-00037-redhat-00001]
at org.apache.camel.processor.Pipeline.process(Pipeline.java:101) [!/:2.23.2.fuse-7_11_0-00037-redhat-00001]
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:201) [!/:2.23.2.fuse-7_11_0-00037-redhat-00001]
at org.apache.camel.component.timer.TimerConsumer.sendTimerExchange(TimerConsumer.java:197) [!/:2.23.2.fuse-7_11_0-00037-redhat-00001]
at org.apache.camel.component.timer.TimerConsumer$1.run(TimerConsumer.java:79) [!/:2.23.2.fuse-7_11_0-00037-redhat-00001]
at java.util.TimerThread.mainLoop(Timer.java:555) [?:1.8.0_282]
at java.util.TimerThread.run(Timer.java:505) [?:1.8.0_282]

Please note that camel-http4 feature is installed and related bundles are active.

241 │ Active │  50 │ 2.23.2.fuse-7_11_0-00037-redhat-00001    │ camel-http4
242 │ Active │  50 │ 4.5.13.redhat-00002                      │ Apache Apache HttpClient OSGi bundle
243 │ Active │  50 │ 4.4.14                                   │ Apache Apache HttpCore OSGi bundle
244 │ Active │  80 │ 1.0.0.SNAPSHOT                           │ Camel Content-Based Router Example

Environment

  • Red Hat Fuse
    • 7.11.1
    • 7.12
  • karaf runtime

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content