Hi You didn't specify the right header for the <recipientList>. It should be start with "sql:xxx" not the sql string that you want to send to.
-- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blogspot.com (http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com (http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On Tuesday, April 2, 2013 at 3:20 PM, kavan desai wrote: > Hi > > I am sending following sql statement to get it executed via Camel-sql > component, which is giving following error. > select complianceid,orderid from WH_STG_ORDER where parentchildtype=# and > complianceid in (#,#,#) and currency=# and tradedate = > to_date(#,'yyyymmdd') and ordtype is null > > Error - > > org.apache.camel.NoSuchEndpointException: No endpoint could be found for: > orderid from WH_STG_ORDER where parentchildtype=# and complianceid in > (#,#,#) and currency=# and tradedate = to_date(#,'yyyymmdd') and ordtype is > null?dataSourceRef=dataSource, please check your classpath contains the > needed Camel component jar. > at > org.apache.camel.util.CamelContextHelper.getMandatoryEndpoint(CamelContextHelper.java:52) > at > org.apache.camel.util.ExchangeHelper.resolveEndpoint(ExchangeHelper.java:85) > at > org.apache.camel.processor.RecipientListProcessor.resolveEndpoint(RecipientListProcessor.java:219) > > > I have already added Camel-sql dependency. If I remove second select field > after ',' it works fine. > Following is camel configuration > > <route id="sqlRoute"> > > <from uri="direct://dwh/sql-query"/> > > <setHeader > headerName="RuleCondition"><simple>${in.body.args[0]}</simple></setHeader> > > <setHeader > headerName="RuleQuery"><simple>sql://${in.body.args[0]}?dataSourceRef=dataSource</simple></setHeader> > > <transform><simple>in.body.args[1]</simple></transform> > > <to uri="report://request"/> > <recipientList><header>RuleQuery</header></recipientList> > <setHeader > headerName="RuleCondition"><constant>RuleCondition</constant></setHeader> > <to uri="report://reply"/> > <log message="${body}"/> > > </route> > > I think ',' is not getting parsed properly,isn't it ? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camle-sql-error-tp5730191.html > Sent from the Camel - Users mailing list archive at Nabble.com > (http://Nabble.com).