Camle sql error

2013-04-02 Thread kavan desai
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(#,'mmdd') and ordtype is null Error -

Re: Cannot rollback() inside an XASession with AMQ 5.6

2013-04-02 Thread Fladnag
Ok, it works with AMQ 5.8. But we can't use this version in our project (neither SMX 4.5.1 and camel 2.10.4 in fact). Just for this simple test, I have to deal with some issues like probably due to bad dependencies like https://issues.apache.org/jira/browse/CXF-4926, fixed last week : AMQ 5.8

recursion with Camel ?

2013-04-02 Thread kikou1984
Hi, I m trying to simulate recursion with camel, i tried with a Loop but it s not the reel purpose. public ArrayList > simule_EclatBQE(Exchange exchange){ ArrayList> lstOflst = new ArrayList >(); ArrayList lstOne = new ArrayList (); ArrayList lstTwo = new ArrayList ();

Re: Camel routing issue

2013-04-02 Thread prabumc...@gmail.com
I have found solution in internet using Predicate we can achieve this, But,one doubt in the link http://camel.apache.org/predicate.html,Theymentioned that we can use AND and OR in Predicate I have added below code in project,But i am getting compilation error.Please kindly help *Predicate god =

Re: Camel routing issue

2013-04-02 Thread Claus Ibsen
Hi You should static import those methods: and, or on the class org.apache.camel.builder.PredicateBuilder http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/builder/PredicateBuilder.html On Tue, Apr 2, 2013 at 10:17 AM, prabumc...@gmail.com wrote: > I have found solution

Re: Camel routing issue

2013-04-02 Thread prabumc...@gmail.com
So can i use like this.. Predicate god = PredicateBuilder.and(admin,PredicateBuilder.or(body().contains("Camel Rider"), header("type").isEqualTo("god"))); On Tue, Apr 2, 2013 at 2:05 PM, Claus Ibsen-2 [via Camel] < ml-node+s465427n5730195...@n5.nabble.com> wrote: > Hi > > You should static impo

Re: Camel routing issue

2013-04-02 Thread Claus Ibsen
Yeah or jus static import those methods to make it easier to read import static org.apache.camel.builder.PredicateBuilder.and; import static org.apache.camel.builder.PredicateBuilder.or; On Tue, Apr 2, 2013 at 10:38 AM, prabumc...@gmail.com wrote: > So can i use like this.. > > Predicate god =

Re: Camel routing issue

2013-04-02 Thread prabumc...@gmail.com
Thank you Claus.. *Regards* Prabu.N On Tue, Apr 2, 2013 at 2:12 PM, Claus Ibsen-2 [via Camel] < ml-node+s465427n573019...@n5.nabble.com> wrote: > Yeah or jus static import those methods to make it easier to read > > import static org.apache.camel.builder.PredicateBuilder.and; > import static o

Re: recursion with Camel ?

2013-04-02 Thread Willem jiang
Hi, I'm not quite understand you question. Do you want to write a unit test or you just want to call this process in the camel route with loop? -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http://www.redhat.com Blog: http://willemjiang.blog

Re: Camle sql error

2013-04-02 Thread Willem jiang
Hi You didn't specify the right header for the . 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://

Re: Refering implicitly to routeContext

2013-04-02 Thread edvicif
I like both idea. With the second one the problem is that it doesn't have this silent extension capability what I want :( Shall I create a JIRA task of this? -- View this message in context: http://camel.465427.n5.nabble.com/Refering-implicitly-to-routeContext-tp5730047p5730204.html Sent from

Re: recursion with Camel ?

2013-04-02 Thread kikou1984
Hi, Actually, i want to restart this bean each time by changing the body. Here an exemple, public void simule_EclatBQE(Exchange exchange){ List in_lst = new ArrayList(); in_lst = (List) exchange.getIn().getBody(); //treatment ArrayList> out_lstOflst = new ArrayList >();

Re: Camle sql error

2013-04-02 Thread kavan desai
I tried to chage the header from RuleCondition to sql:RuleCondition however then query i am passing not executed at all. One of the reason is because of ',' in the select statement, the later part is trated as seperate camel message and for which end ponit not found. I am seeing following bebug

Re: Refering implicitly to routeContext

2013-04-02 Thread Claus Ibsen
On Tue, Apr 2, 2013 at 11:21 AM, edvicif wrote: > I like both idea. With the second one the problem is that it doesn't have > this silent extension capability what I want :( > > Shall I create a JIRA task of this? > Yeah feel free to create a JIRA ticket. > > > -- > View this message in contex

CronSchedulePolicy with cxf endpoint

2013-04-02 Thread Richa
Hi, I have a cron expression which triggers the route at a particular time everyday. This works fine with all the endpoints like ftp,sftp, etc. But when I use a cxf endpoint, the route runs for the first time, but the next day the route does not start. Can you please tell me why this is happening?

Re: recursion with Camel ?

2013-04-02 Thread Claus Ibsen
Hi I suggest looking at the dynamic router eip On Tue, Apr 2, 2013 at 10:02 AM, kikou1984 wrote: > Hi, > > I m trying to simulate recursion with camel, i tried with a Loop but it s > not the reel purpose. > > > public ArrayList > simule_EclatBQE(Exchange exchange){ > > ArrayList> lstOflst = n

Re: Camle sql error

2013-04-02 Thread Claus Ibsen
You can configure to use a different separator on the recipient list eip. On Tue, Apr 2, 2013 at 11:12 AM, kavan desai wrote: > I tried to chage the header from RuleCondition to sql:RuleCondition however > then query i am passing not executed at all. > > > One of the reason is because of > ',' in

One processor for multiple camelContext

2013-04-02 Thread valerian.merkling
Hi ! In my project there is a lot of communication by mail with attached zipped xml files. So i made two processor to zip the file, or unzip from a mail. My problem is that i have three differents bundles (three jar, three camelContext), all of them using those two processors. How can i make t

Multiple from for the same route

2013-04-02 Thread ABouchama
Hi, I want to create a single route camel that have 3 from entries : http://www.google.com"/> 1. Is it possible to have these 3 from in the same route ? 2. Is possible to externalize these 3 from in cfg file, and to load automatically values from cfg when is changes, for example : Regard

Re: recursion with Camel ?

2013-04-02 Thread kikou1984
Hi, I don t think i need a dynamic routes , i only want make a recursive form to my Bean. The output of the bean, should be injected as input of the same bean !!! like the exemple below. If i have to use dynamic routes, how can i do , i read on the website but i didn't understand how can i us

Re: Multiple from for the same route

2013-04-02 Thread Claus Ibsen
Short answers Ad 1) Yes Ad 2) No On Tue, Apr 2, 2013 at 4:25 PM, ABouchama wrote: > Hi, > > I want to create a single route camel that have 3 from entries : > > > http://www.google.com"/> > > > > 1. Is it possible to have these 3 from in the same route ? > 2. Is possible to externalize these

Is the result of this builder reusable? XQueryBuilder.xquery("//foo");

2013-04-02 Thread Chris Wolf
I want to perform an XQuery outside of DSL (in a Processor). Something like: XQueryBuilder hostXQ = XQueryBuilder .xquery("//remote[remoteId/@value='CBOE34']/server/@value"); String host = hostXQ.evaluateAsString(exchange); Second question is can I parameterize the XQuery like so: XQuery

Re: It is possible with Camel to use dynamic consumer? **after context start**

2013-04-02 Thread Claus Ibsen
Hi There is a ticket scheduled for Camel 3.0 to allow enrich and pollEnrich to support "dynamic uris" like the recipient list can do. Though implementing this requires an API change and thus scheduled for 3.0. You can always use a java bean to consume from an dynamic computed endpoint. For examp

Re: recursion with Camel ?

2013-04-02 Thread valerian.merkling
Why don't you just make your processor call a recursive function ? A processor isn't made to be able to invoke another processor, you need to make it recursive with your route http://camel.apache.org/schema/spring";> $in.header.continue = 't

Re: recursion with Camel ?

2013-04-02 Thread kikou1984
Hi, Thxs for u r answer , i tried it and it works. sometimes , I complicates things. -- View this message in context: http://camel.465427.n5.nabble.com/recursion-with-Camel-tp5730193p5730226.html Sent from the Camel - Users mailing list archive at Nabble.com.

Permission denied with Camel-FTP when configuring jail+chroot+sftp only with openssh

2013-04-02 Thread lleclerc
Hi, I am using camel 2.10.3, I can get this route from(direct).to(sftp) to work using openssh as server. There is no problem. I am now adding this to my server config (sshd_config) : Match User myuser ChrootDirectory /home AllowTCPForwarding no X11Forwarding no ForceCommand intern

Deleting MQ Temporary Queue

2013-04-02 Thread PhilBurress
Our application is using MQ temporary dynamic queues for our replyTo queue in a request/reply pattern. It works fine and is very fast, except the temporary queues do not get deleted at the end of the transaction; only when the application server is shut down. Is there a hook somewhere in Camel wher

Re: It is possible with Camel to use dynamic consumer? **after context start**

2013-04-02 Thread Chris Wolf
May I have the ticket #? (so I can watch/follow) When you say, "use a java bean" - what do you mean? Instantiate the FTP component like? FtpComponent comp = new FtpComponent(context); @SuppressWarnings("unchecked") FtpEndpo

Re: CronSchedulePolicy with cxf endpoint

2013-04-02 Thread Christian Müller
Can you share your route/configuration with us? Sent from a mobile device Am 02.04.2013 11:46 schrieb "Richa" : > Hi, > I have a cron expression which triggers the route at a particular time > everyday. This works fine with all the endpoints like ftp,sftp, etc. But > when I use a cxf endpoint, th

Re: Camel-Crypto ElGamal encryption works in mvn camel:run but not in Karaf/OSGi

2013-04-02 Thread Christian Müller
UPDATE: I use Java 1.6.0_43 for the following: cmueller$ cd workspaceCamel/camel/components/camel-crypto/ remove the @Ignore annotation on org.apache.camel.converter.crypto.PGPDataFormatElGamalTest.java cmueller$ mvn clean test -Dtest=PGPDataFormatElGamalTest ... Tests run: 3, Failures: 0, Erro

Re: Camel-Crypto ElGamal encryption works in mvn camel:run but not in Karaf/OSGi

2013-04-02 Thread Christian Müller
If I change the dependency from org.bouncycastle/bcpg-jdk16/1.46 -> org.apache.servicemix.bundles/org.apache.servicemix.bundles.bcpg-jdk16/1.46_2 and org.bouncycastle/bcprov-jdk16/1.46 -> org.apache.servicemix.bundles/org.apache.servicemix.bundles.bcprov-jdk16/1.46_2 in camel-crypto 2.10.4 and ru

Re: Possible memory leak in org.apache.activemq.pool.PooledSession

2013-04-02 Thread vadim
After further investigation, I see how besides closing the session and prior to that, a close call is made on ActiveMQMessageConsumer. So, there is no harm in commenting out consumers.add(consumer) even in the case of PollingConsumer. vadim -- View this message in context: http://camel.465427.

Re: Is the result of this builder reusable? XQueryBuilder.xquery("//foo");

2013-04-02 Thread Willem jiang
I think you can use the XQueryBuilder in the Processor just like you showed. If you want to call the evaluateAsString multiple times, you need to make sure the message body is reread able. You can convert the message body into String before you process it in your processor. -- Willem Jiang

Re: One processor for multiple camelContext

2013-04-02 Thread Willem jiang
Hi, Please check out my comment in the below mail. -- 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:/

Re: Transactional batching

2013-04-02 Thread boday
this is a really old thread, but I'm wondering if anyone has any updated ideas on this...I have a similar requirement to read from an AMQ queue, batch X messages together and then process. I'm currently doing this with the aggregator/hawtdb repo combination but performance is proving too slow...

Re: Jetty to ActiveMQ Failure

2013-04-02 Thread mferor76
I had the same issue. After reading this I got the idea to use this config for my PooledConnectionFactory and it works In the javadoc it says that the expiryTimeout is used to for activemq failover. A

Re: Deleting MQ Temporary Queue

2013-04-02 Thread Claus Ibsen
On Tue, Apr 2, 2013 at 8:01 PM, PhilBurress wrote: > Our application is using MQ temporary dynamic queues for our replyTo queue in > a request/reply pattern. It works fine and is very fast, except the > temporary queues do not get deleted at the end of the transaction; only when > the application

How to consume old file first in SFTP ?

2013-04-02 Thread sarfaraj
Hi, We need to consume file based on date modified. We need to consumed old file first then latest. I did "sortBy=reverse:file:modifed"but still its consuming by name. I also tried "sortBy=file:modifed", but did not worked. Can someone tell me how to consume old file first in SFTP consumer

Re: CronSchedulePolicy with cxf endpoint

2013-04-02 Thread Richa
My route looks like this: CronScheduledRoutePolicy cronScheduledRoutePolicy=new CronScheduledRoutePolicy(); cronScheduledRoutePolicy.setRouteStartTime("0 0/3 * * * ?"); from("some sftp location") .noAutoStartup() .routePolicy(cronScheduledRoutePolicy) .to("cxf location") -- View this message i