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

后端 未结 2 436
醉酒成梦
醉酒成梦 2021-01-14 03:14

I have written a simple apache camel project which will eventually be deployed in a FUSE container. For now, I\'m simply trying to get a basic unit test working. I\'m usin

相关标签:
2条回答
  • 2021-01-14 03:30

    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.

    0 讨论(0)
  • 2021-01-14 03:38

    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

    0 讨论(0)
提交回复
热议问题