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>
user3808269
  • 1,321
  • 3
  • 21
  • 40
  • If you want to connect to the local broker, you can omit the "activemq" declaration. There is an example in JBoss Fuse 6.1, see under quickstarts - there is the JMS example that uses ActiveMQ + Camel. – Claus Ibsen Apr 11 '15 at 05:58
  • When you write the "'activemq' declaration" do you mean in the `` and `` elements inside the `` element? Thank-you for the helpful reply! – user3808269 Apr 12 '15 at 19:31

1 Answers1

1

You should use the same version of Apache Camel as JBoss Fuse supports/ships with. Camel 2.15.x is not yet supported this requires the upcoming JBoss Fuse 6.2 release.

You can use Fuse IDE tooling to create a Fuse project that uses the correct version of Camel.

An alternative is to adjust the pom.xml which which the archetype generted, to the same Camel version that Fuse ships. You can find the Camel version from the Fuse shell by typing list and find the camel-core line that should print the version.

Claus Ibsen
  • 56,060
  • 7
  • 50
  • 65
  • I tried your 'alternative' method since the learning curve of the Fuse IDE is quite daunting and I still receive that the Blueprint is [Failure] upon starting the bundle. Thank-you for taking a guess at what is going wrong with my program though Claus. :D – user3808269 Apr 10 '15 at 20:44
  • You can try look in the log file, in data/logs/fuse.log file. Or use log:display from the shell - the latter only shows 1000 lines back (I think) – Claus Ibsen Apr 11 '15 at 05:57
  • It works when copying a cfg.xml file mentioned in the 'jms' quickstart to the etc folder and removing the bean element with the `id=activemq`. :) Thank-you for the help. Maybe mention this in your answer for some solid help for some poor confused programmer flipping out? :D – user3808269 Apr 13 '15 at 03:36