-
1. Re: Camel support in jboss esb
tadayosi Aug 6, 2012 9:30 AM (in response to eravisankar1984)1 of 1 people found this helpfulHi,
Have you chected Camel Gateway?
http://docs.jboss.org/jbossesb/docs/4.11/manuals/html/Programmers_Guide/index.html#d0e3455
-
2. Re: Camel support in jboss esb
tcunning Aug 6, 2012 3:05 PM (in response to tadayosi)The Camel Gateway supports Camel from: URI's - but the "to:" will go to the ESB service that listens to it.
In the example given, you would have to use an ESB notifier with file and JMS notifiers to implement the to: logic in JBossESB.
-
3. Re: Camel support in jboss esb
eravisankar1984 Aug 7, 2012 7:03 AM (in response to tcunning)Hi,
Thanks for the replies.
I have started exploring the Camel features in Jboss SOA-P5.3. I could implement protocols like file, Jms.
But when i am trying to implement camel components like ibatis i am getting deploymen errors.
My esb.xml is
<?xml version="1.0"?>
<jbossesb parameterReloadSecs="5"
xmlns="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.1.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.1.xsd http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schemas/xml/jbossesb-1.3.1.xsd">
<providers>
<camel-provider name="CamelJdbcProvider">
<camel-bus busid="CamelJdbcProvider">
<from uri="esbschedule:5000:mybatis:selectAllAccountsZ?statementType=QueryForList"/>
</camel-bus>
</camel-provider>
</providers>
<services>
<service category="CamelJdbcGw" description="CamelJdbcGw"
invmScope="GLOBAL" name="CamelJdbcGw">
<listeners>
<camel-gateway busidref="CamelJdbcProvider" name="CamelJdbcGwListener"/>
</listeners>
<actions>
<action class="org.jboss.soa.esb.actions.SystemPrintln" name="printJdbcRecords">
<property name="message" value="printJdbcRecords"/>
</action>
</actions>
</service>
</services>
</jbossesb>and i have added the jars camel-core-2.9.2,camel-ibatis-2.10.0, ibatis-sqlmap-2.3.4.726 and ojdbc14-10.2.0 to 'jboss-as\server\default\deployers\esb.deployer\lib'
Deployment errors are as
2012-08-07 09:56:41,046 INFO [org.apache.camel.impl.DefaultCamelContext] (HDScanner) Apache Camel 2.4.0 (CamelContext: camel-1) is starting
2012-08-07 09:56:41,046 INFO [org.apache.camel.impl.DefaultCamelContext] (HDScanner) JMX is disabled. Using DefaultManagementStrategy.
2012-08-07 09:56:41,267 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (HDScanner) Error installing to Start: name=jboss.esb.vfsfile:/D:/JBossLab/jboss-soa-p-5/jboss-as/server/default/deploy/Jboss_Camel_Jdbc_Notifier/esbcontent/META-INF/jboss-esb.xml state=Create
java.lang.NoSuchMethodError: org.apache.camel.impl.ScheduledPollConsumer: method <init>(Lorg/apache/camel/Endpoint;Lorg/apache/camel/Processor;)V not found
at org.apache.camel.impl.ScheduledBatchPollingConsumer.<init>(ScheduledBatchPollingConsumer.java:39)
at org.apache.camel.component.ibatis.IBatisConsumer.<init>(IBatisConsumer.java:68)
at org.apache.camel.component.ibatis.IBatisEndpoint.createConsumer(IBatisEndpoint.java:65)
at org.apache.camel.component.ibatis.IBatisEndpoint.createConsumer(IBatisEndpoint.java:33)
at org.apache.camel.impl.EventDrivenConsumerRoute.addServices(EventDrivenConsumerRoute.java:60)
at org.apache.camel.impl.DefaultRoute.onStartingServices(DefaultRoute.java:75).
.
org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
DEPLOYMENTS IN ERROR:
Deployment "jboss.esb.vfsfile:/D:/JBossLab/jboss-soa-p-5/jboss-as/server/default/deploy/Jboss_Camel_Jdbc_Notifier/esbcontent/META-INF/jboss-esb.xml" is in error due to the following reason(s): java.lang.NoSuchFieldError: logat org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1008)
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:954)
If i dont use the camel-core-2.9.2.jar
the error is like
Deployment "jboss.esb.vfsfile:/D:/JBossLab/jboss-soa-p-5/jboss-as/server/default/deploy/Jboss_Camel_Jdbc_Notifier/esbcontent/META-INF/jboss-esb.xml" is in error due to the following reason(s): java.lang.ClassNotFoundException: org.apache.camel.impl.ScheduledBatchPollingConsumer
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1008)
at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:954)
Please let me know if something is wrong with my code.
Thanks,
Ravi
-
4. Re: Camel support in jboss esb
tcunning Aug 8, 2012 11:09 AM (in response to eravisankar1984)Looks like a mismatch of camel-core JARs. Did you remove
./server/default/deployers/esb.deployer/lib/camel-core-2.4.0.jar
after adding the camel-core-2.9.2.jar?
I'm not sure adding the camel-core-2.9.2.jar will work - you can give it a shot - but you may need to match up the camel-ibatis with the camel-core-2.4.0.jar that already exists within the esb.deployer.
-
5. Re: Camel support in jboss esb
nandeesh.ln Oct 10, 2012 8:02 AM (in response to tcunning)Hi,
I have similar problem. I am using jboss soa5.3 platform, which supports camel 2.4. I am trying to integrate camel-jms2.4 component with jboss-esb.xml.
I have created a queue which camel listens and route it to esb service. I have copied camel-jms2.4 jar into esb.deployers folder.
jboss-esb.xml
</jms-provider>
<jms-bus busid="deployGwChannelCamel">
<jms-message-filter
dest-name="queue/quickstart_bpm_orchestration2_start_Request_gw_camel" dest-type="QUEUE"/>
</jms-bus>
<jms-bus busid="deployEsbChannelCamel">
<jms-message-filter
dest-name="queue/quickstart_bpm_orchestration2_start_Request_esb_camel" dest-type="QUEUE"/>
</jms-bus>
</jms-provider>
<camel-provider name="camel_provider">
<camel-bus busid="camel_file_bus" >
<!-- <from uri="file://D:/test/input1?delete=true"/>-->
<from uri="jms:queue:deployGwChannelCamel"/>
</camel-bus>
</camel-provider>
</providers>
<services>
<service category="start_loan_service" description="start_loan" name="start_loan">
<listeners>
<camel-gateway name="startMainGateway" busidref="camel_file_bus" async="true" >
<property name="gatewayClass" value="org.jboss.soa.esb.listeners.gateway.camel.ApacheCamelListener" />
</camel-gateway>
</listeners>
<actions mep="OneWay">
<action class="org.jboss.soa.esb.actions.TestMessageStore" name="testStore"/>
<action class="org.jboss.soa.esb.actions.SystemPrintln" name="Log_Input_File">
<property name="message"/>
<property name="printfull" value="true"/>
</action>
While deployment, i am getting below exception
12-10-10 16:50:05,447 ERROR [org.jboss.kernel.plugins.dependency.AbstractKernelController] (main) Error installing to Start: name=jboss.esb.vfszip:/D:/PTV/jboss-soa-p-5/jboss-as/server/default/deploy/loan_process.esb/ state=Create
org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleException: problem starting CamelContext
at org.jboss.soa.esb.listeners.gateway.camel.CamelGateway.doStart(CamelGateway.java:271)
at org.jboss.soa.esb.listeners.lifecycle.AbstractManagedLifecycle.start(AbstractManagedLifecycle.java:182)
at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.startInstances(ManagedLifecycleController.java:136)
at org.jboss.soa.esb.listeners.lifecycle.ManagedLifecycleController.start(ManagedLifecycleController.java:67)
at org.jboss.soa.esb.listeners.deployers.mc.EsbDeployment.start(EsbDeployment.java:232)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
Caused by: java.lang.IllegalArgumentException: connectionFactory must be specified
at org.apache.camel.util.ObjectHelper.notNull(ObjectHelper.java:262)
at org.apache.camel.component.jms.JmsConfiguration.createConnectionFactor
-
6. Re: Camel support in jboss esb
tcunning Oct 10, 2012 10:25 AM (in response to nandeesh.ln)Nandeesh,
I realize it is begging the question, but is there a reason why you would use a camel-listener in this instance? Wouldn't it make more sense to set up a jms-listener to listen to that queue?
The connectionFactory error seems like an issue with your configuration - I think you need to set it in your endpoint.
-
7. Re: Camel support in jboss esb
nandeesh.ln Oct 11, 2012 3:22 AM (in response to tcunning)Thanks Tom for reply. I am looking for a example where camel non-core components configured and used in jboss-esb.xml like FTP, JMS or smtp.
Thanks
Nandeesh
-
8. Re: Camel support in jboss esb
tcunning Oct 11, 2012 9:13 AM (in response to nandeesh.ln)Nandeesh, I don't think there is an example like that. This document explains how to deploy non-core components :
https://community.jboss.org/wiki/CamelGateway
The issue you are talking about above though really seems like an issue with your Camel endpoint - connectionFactory is one of the options you can set :