0

I am trying to build a simple Camel route using JBoss Fuse and Maven basically. I am using the command mvn archetype:generate to create a skeleton project.

When the prompt says, "Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): 582:" I type camel.

Then I select this option: 49: remote -> org.apache.camel.archetypes:camel-archetype-blueprint (Creates a new Camel project with OSGi blueprint support. Ready to be deployed in OSGi.)

Please see below:

Choose a number or apply filter (format: [groupId:]artifactId, case sensitive contains): : I type 49 for this option.

For the option Choose org.apache.camel.archetypes:camel-archetype-blueprint version: I press enter for Camel 2.15.1.

Define value for property 'groupId': : org.me

For the option: Define value for property 'artifactId': : fuse-ghettoblasting-blueprint

For the option: Define value for property 'version': 1.0-SNAPSHOT: : 1.0

For the option: Define value for property 'package': org.me: : org.me.demo

I run this command mvn clean install to install the pom.xml and the jar to my local Maven repository.

I then go to the JBoss Fuse console and type:

JBossFuse:karaf@root> osgi:install mvn:org.me/fuse-ghettoblasting-blueprint/1.0

Then I receive a bundle ID: Bundle ID: 389

When I typeJBossFuse:karaf@root> list I see the bundle but it says Failure in the Blueprint field as shown below: ID State Blueprint Spring Level Name `[ 389] [Active ] [Failure ] [ ] [ 60] Camel Blueprint Route (1.0.0)

I had a similar experience when running through this tutorial: https://codevomit.wordpress.com/2014/12/24/simple-camel-route-in-jboss-fuse/

This tutorial involved actually creating routes in the ActiveMQ interface on the localhost running at port 8181

Is there an expert out there reading this that knows what I am missing? Why is the Blueprint failing? Why is the Message sent from the Queue not logged as shown in the tutorial from CodeVomit?

Regards,

UPDATE

Here is my source code for the blueprint.xml file.

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:camel="http://camel.apache.org/schema/blueprint"
       xsi:schemaLocation="
       http://www.osgi.org/xmlns/blueprint/v1.0.0 http://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">


<!-- connect to the local ActiveMQ broker -->
<bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent">
  <property name="brokerURL" value="tcp://localhost:61616" />
  <property name="userName" value="user123" />
  <property name="password" value="user123" />
  <property></property>
</bean>

  <camelContext id="blueprintContext" trace="false" xmlns="http://camel.apache.org/schema/blueprint">

    <route id="queue2queue">
        <from uri="activemq://source-queue" />
        <log message="the message body is: ${body}" loggingLevel="INFO" />
        <to uri="activemq://sink-queue" />
    </route>



  </camelContext>

</blueprint>
4

1 回答 1

1

您应该使用与 JBoss Fuse 支持/随附的相同版本的 Apache Camel。Camel 2.15.x 尚不支持,这需要即将发布的 JBoss Fuse 6.2 版本。

您可以使用 Fuse IDE 工具创建使用正确版本的 Camel 的 Fuse 项目。

另一种方法是将pom.xml原型生成的版本调整为与 Fuse 发布的相同的 Camel 版本。list您可以通过键入并找到camel-core应该打印版本的行从 Fuse shell 中找到 Camel版本。

于 2015-04-10T05:12:37.483 回答