Bundle is waiting for namespace handlers [http://camel.apache.org/schema/blueprint]

僤鯓⒐⒋嵵緔 提交于 2019-12-01 06:26:08

I had the same error but another setup then @mdarwin, so I want to share my solution with you, too.

I startet a project with the camel-archetype-blueprint, so my namespaces looked like the following:

blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
   xsi:schemaLocation="
     http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
     http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd
     http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0 http://aries.apache.org/schemas/blueprint-cm/blueprint-cm-1.1.0.xsd">

At the beginning it was a really simple blueprint with a timer and a file endpoint, so the implementation is not important here. I deployed my bundle to Karaf and for that I installed the aries-blueprint feature.

What I missed, and I feel really ashamed, was to install camel, too. For that I had to add the repo and than install it, as you can read here:

feature:repo-add camel
feature:install camel

Now the namespace handler is there.

I think that was obvious, but it still took some minutes to figure it out.

mdarwin

Turns out that a routeContext only exists in the context of xml dsl, and cannot be referenced from the Java DSL. This in my opinion is a bug, since it restricts the flexibility of mixing xml and java configuration.

By changing the routeContext to a camelContext, this fixed the problem.

See also this question: Camel: importing routeContext into an external camelContext

Also related: https://issues.apache.org/jira/browse/CAMEL-5717

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!