java - JBoss Fuse - Maven Archetype Blueprint - Camel - Routing -
i trying build simple camel
route using jboss fuse
, maven
basically. using command mvn archetype:generate
create skeleton project.
when prompt says, "choose number or apply filter (format: [groupid:]artifactid, case sensitive contains): 582:" type camel
.
then select option: 49: remote -> org.apache.camel.archetypes:camel-archetype-blueprint (creates new camel project osgi blueprint support. ready deployed in osgi.)
please see below:
choose number or apply filter (format: [groupid:]artifactid, case sensitive contains): :
type 49
option.
for option choose org.apache.camel.archetypes:camel-archetype-blueprint version:
press enter camel 2.15.1.
define value property 'groupid': :
org.me
for option: define value property 'artifactid': :
fuse-ghettoblasting-blueprint
for option: define value property 'version': 1.0-snapshot: :
1.0
for option: define value property 'package': org.me: :
org.me.demo
i run command mvn clean install
install pom.xml , jar local maven repository.
i go jboss fuse console , type:
jbossfuse:karaf@root> osgi:install mvn:org.me/fuse-ghettoblasting-blueprint/1.0
then receive bundle id: bundle id: 389
when typejbossfuse:karaf@root> list
see bundle says failure
in blueprint field shown below: id state blueprint spring level name `[ 389] [active ] [failure ] [ ] [ 60] camel blueprint route (1.0.0)
i had similar experience when running through tutorial: https://codevomit.wordpress.com/2014/12/24/simple-camel-route-in-jboss-fuse/
this tutorial involved creating routes in activemq interface on localhost running @ port 8181
is there expert out there reading knows missing? why blueprint failing? why message sent queue not logged shown in tutorial codevomit?
regards,
update
here source code 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 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>
you should use same version of apache camel jboss fuse supports/ships with. camel 2.15.x not yet supported requires upcoming jboss fuse 6.2 release.
you can use fuse ide tooling create fuse project uses correct version of camel.
an alternative adjust pom.xml
which archetype generted, same camel version fuse ships. can find camel version fuse shell typing list
, find camel-core
line should print version.