Re: Camel sql component with classpath script

2022-04-11 Thread Ephemeris Lappis
Hello. Thanks for your answer. I'm a bit disappointed : I can prototype as simple blueprints, without packaging, almost all my Camel routes, except the sql component. Could you please explain why the sql URI including the "classpath" is not interpreted the same way when running from a jar bun

Re: Camel sql component with classpath script

2022-04-11 Thread Claus Ibsen
Hi That is not possible. You cannot drop a .sql file into the deploy folder of karaf, and assume it knows how to deploy that. You need to put the sql script somewhere in the file system, and use file: to refer to the file. Or bundle it together with your camel app. Or bundle it in another .jar (m

Re: camel sql-stored component queryTimeout option not present

2021-03-25 Thread Anand Kumar
Hi Claus Thanks for replying. I have raised JIRA : CAMEL-16405 Thanks and Regards Anand Kumar On Thu, Mar 25, 2021, 20:10 Claus Ibsen wrote: > Hi > > This is not possible, this requires to implement an improvement to the > camel-sql component. > You are welcome to create a JIRA asking for thi

Re: camel sql-stored component queryTimeout option not present

2021-03-25 Thread Claus Ibsen
Hi This is not possible, this requires to implement an improvement to the camel-sql component. You are welcome to create a JIRA asking for this On Thu, Mar 25, 2021 at 3:06 PM Anand Kumar wrote: > > Hi Team > > How to setQueryTimeout while calling stored procedure using sql-stored > component ?

Re: Camel sql Component should retrieve data when the particular column is null using select query

2017-05-26 Thread darwinanirudh
Thank you for response. regards Darwin -- View this message in context: http://camel.465427.n5.nabble.com/Camel-sql-Component-should-retrieve-data-when-the-particular-column-is-null-using-select-query-tp5799613p5800760.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-SQL 2.18.2 problem with MongoDbBasicConverters

2017-05-18 Thread antopet
Hi, I removed the mongodb module from the wildfly, and now everthing work perfect when I call the postgresDB with (4.5.0 and 4.6.0). So it is probably something wrong with the mongodb module that effect the sql Component? how? //Anton -- View this message in context: http://camel.465427.n5

Re: Camel sql Component should retrieve data when the particular column is null using select query

2017-05-18 Thread darwinanirudh
${body[CDR_JSON_FORM]}!= Caused by: org.apache.camel.language.simple.types.SimpleIllegalSyntaxEx

Re: Camel sql Component should retrieve data when the particular column is null using select query

2017-05-18 Thread raja
Change from: ${body[CDR_JSON_FORM]}!= null Change TO: ${body[CDR_JSON_FORM]} != null -- View this message in context: http://camel.465427.n5.nabble.com/Camel-sql-Component-should-retrieve-data-when-the-particular-column-is-null-using-select-query-tp5799613p5799771.html Sent from the Came

Re: Camel-SQL 2.18.2 problem with MongoDbBasicConverters

2017-05-17 Thread antopet
Hi, Yes it is something when I run the code in wildfly (in 4.6.0), when I run it in standalone mode I don't get the problem. I try to connect a PostgresDb not a mongoDB. And the problem is (from the log): Is the line,in DefaultSqlPrepareStatmentStrategy.java: 186: Map bodyMap = safeMap(exchange

Re: Camel-SQL 2.18.2 problem with MongoDbBasicConverters

2017-05-09 Thread Claus Ibsen
Hi Not sure its likely some classloading on jboss wildfly side. There is a 4.6.0 release of camel-widlfly. And if you still have trouble then you can report it to their community https://github.com/wildfly-extras/wildfly-camel On Tue, May 9, 2017 at 3:52 PM, antopet wrote: > Hi, > I'm trying to

Re: Camel-SQL more than one IN clauses in SQL throws Exception

2017-04-19 Thread Claus Ibsen
It might also work on the latest 2.17.x release in case you want to stay on that release branch. On Tue, Apr 18, 2017 at 5:37 PM, akpcnu wrote: > Thanks Clause, It worked on 2.18.3 > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Camel-SQL-more-than-one-IN-clauses-i

Re: Camel-SQL more than one IN clauses in SQL throws Exception

2017-04-18 Thread akpcnu
Thanks Clause, It worked on 2.18.3 -- View this message in context: http://camel.465427.n5.nabble.com/Camel-SQL-more-than-one-IN-clauses-in-SQL-throws-Exception-tp5797818p5797826.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel-SQL more than one IN clauses in SQL throws Exception

2017-04-18 Thread Claus Ibsen
Try newer Camel version On Tue, Apr 18, 2017 at 3:47 PM, akpcnu wrote: > I am using CAMEL 2.17.3 and having two IN clauses in SQL query causes below > exception: > > org.springframework.jdbc.UncategorizedSQLException: > PreparedStatementCallback; uncategorized SQLException for SQL []; SQL state >

Re: camel sql insert clear body with CamelSqlRetrieveGeneratedKeys and MariaDB

2017-03-31 Thread Zoran Regvart
t; Product Owner Integrations / Integrations Manager > Prince II certified – ITIL certified > Tel: +32-3-326.50.75 > > -Original Message- > From: Zoran Regvart [mailto:zo...@regvart.com] > Sent: vrijdag 31 maart 2017 12:14 > To: users@camel.apache.org > Subject: Re: c

RE: camel sql insert clear body with CamelSqlRetrieveGeneratedKeys and MariaDB

2017-03-31 Thread Ronny Aerts
rince II certified – ITIL certified Tel: +32-3-326.50.75 -Original Message- From: Zoran Regvart [mailto:zo...@regvart.com] Sent: vrijdag 31 maart 2017 12:14 To: users@camel.apache.org Subject: Re: camel sql insert clear body with CamelSqlRetrieveGeneratedKeys and MariaDB Hi Ronny, from w

Re: camel sql insert clear body with CamelSqlRetrieveGeneratedKeys and MariaDB

2017-03-31 Thread Zoran Regvart
Hi Ronny, from what I can see from the SqlProducer source code the body is set if the PreparedStatement::execute method returns `true`[1]. I could be reading this wrong, but to me it seems that you're using insert/update statement that does not return a ResultSet, so in that case the body will be n

Re: Camel SQL as delta consumer

2016-12-07 Thread Claus Ibsen
Hi No this is not supported. There is no state in the SQL component. You can use the idempotent consumer EIP pattern for this http://camel.apache.org/idempotent-consumer.html Mind that this will still query and retrieve the same rows over and over again, then the idempotent will filter out duplic

Re: R: Re: camel-sql IN query number of parameters mismatch(2.18.0)

2016-11-19 Thread imranrazakhan
Hi Julian, One observation regarding camel-sql(2.18.0) IN query , if we have one dynamic IN it works fine but if we have two dynamic IN it throws error, if i replace msisdn with static value it works fine, i tested with 2.18.0 select * from subscriber s where status NOTIN(7,8) AND s.msisdn I

Re: Camel SQL

2016-10-12 Thread fabryprog
If you execute your query using alias (count(*) as c) you can use simple EL. http://camel.apache.org/simple.html The query result is into body input message For example: *${body[c]}*. It is a list of hashmap object. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-

Re: camel sql insert ouput

2016-08-09 Thread Vitalii Tymchyshyn
@gmail.com] > Sent: dinsdag 9 augustus 2016 15:38 > To: users@camel.apache.org > Subject: Re: camel sql insert ouput > > What Camel version and which camel component do you use for SQL? > > On Tue, Aug 9, 2016 at 3:13 PM, Ronny Aerts wrote: >> Hallo camel communit

Re: camel sql insert ouput

2016-08-09 Thread Claus Ibsen
--- > From: Claus Ibsen [mailto:claus.ib...@gmail.com] > Sent: dinsdag 9 augustus 2016 15:38 > To: users@camel.apache.org > Subject: Re: camel sql insert ouput > > What Camel version and which camel component do you use for SQL? > > On Tue, Aug 9, 2016 at 3:13 PM, Ronny Aerts wrot

RE: camel sql insert ouput

2016-08-09 Thread Ronny Aerts
.com] Sent: dinsdag 9 augustus 2016 15:38 To: users@camel.apache.org Subject: Re: camel sql insert ouput What Camel version and which camel component do you use for SQL? On Tue, Aug 9, 2016 at 3:13 PM, Ronny Aerts wrote: > Hallo camel community, > > I'm doing a normal sql insert

Re: camel sql insert ouput

2016-08-09 Thread Claus Ibsen
What Camel version and which camel component do you use for SQL? On Tue, Aug 9, 2016 at 3:13 PM, Ronny Aerts wrote: > Hallo camel community, > > I'm doing a normal sql insert into an sql server database and it seems that > after the insert, my exchange in body and all my attachments are gone. Is

RE: camel sql joined query with parameters won't run on sql server

2016-07-20 Thread Karts
I have the same issue with sql server, but it seems to be related to alias + named param rather than a joined query. The following works fine: .setHeader("ExternalRef", simple("1234")) .to("sql:select event from events where id= :#ExternalRef") But if I alias the table : .setHeader("ExternalRef

Re: R: Re: camel-sql IN query number of parameters mismatch

2016-07-16 Thread juliaaano
Thanks, Claus. I was about to start on doing that now. I you haven't gone too far, I still volunteer to work on it. Cheers. -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-IN-query-number-of-parameters-mismatch-tp5785054p5785175.html Sent from the Camel - Users mail

Re: R: Re: camel-sql IN query number of parameters mismatch

2016-07-16 Thread Claus Ibsen
Hi I logged a ticket and are working on a fix https://issues.apache.org/jira/browse/CAMEL-10151 On Fri, Jul 15, 2016 at 5:45 PM, Claus Ibsen wrote: > Hi > > Yeah that is a bug in the parser when you have dynamic body and IN > together. You are welcome to log a JIRA and submit a PR with an unit >

Re: R: Re: camel-sql IN query number of parameters mismatch

2016-07-15 Thread Claus Ibsen
Hi Yeah that is a bug in the parser when you have dynamic body and IN together. You are welcome to log a JIRA and submit a PR with an unit test (create a new unit test so the existing test can be as-is) On Wed, Jul 13, 2016 at 7:11 PM, juliaaano wrote: > Yes. Unfortunately I still have the same

Re: R: Re: camel-sql IN query number of parameters mismatch

2016-07-13 Thread juliaaano
Yes. Unfortunately I still have the same problem for an endpoint such as: .toD("sql:UPDATE orders SET customer = :#Customer WHERE orderId IN (:#in:orders)") I don't see how this could have solved the problem since I have failing unit tests at the sql component level. Should I make this tests avai

R: Re: camel-sql IN query number of parameters mismatch

2016-07-13 Thread Andrea Cosentino
Did you try with a dinamica endpoint toD? Il mer, 13 lug, 2016 alle 12:13, juliaaano ha scritto: Hello, I don't think this is related to the driver. I've extended the existing camel test case to reproduce the aforementioned scenario. Check it out at https://github.com/juliaaano/camel/tree

Re: camel-sql IN query number of parameters mismatch

2016-07-13 Thread juliaaano
Hello, I don't think this is related to the driver. I've extended the existing camel test case to reproduce the aforementioned scenario. Check it out at https://github.com/juliaaano/camel/tree/sql-in-multiple-params There is not Oracle JBDC driver involved in the unit test as well as with the se

Re: camel-sql IN query number of parameters mismatch

2016-07-12 Thread Tadayoshi Sato
Hi, Looks like the same issue was discussed in this ML a month ago :-) http://camel.465427.n5.nabble.com/camel-sql-SQL-IN-Query-issue-2-17-1-td5783264.html Isn't it the same as yours? For convenience, Claus suggested the following solution in that thread: > I wonder if its the Oracle JDBC drive

RE: camel sql joined query with parameters won't run on sql server

2016-06-26 Thread Ronny Aerts
Sent: zaterdag 25 juni 2016 23:04 To: users@camel.apache.org Subject: Re: camel sql joined query with parameters won't run on sql server Hi Ronny, I had the same kind of problem recently and it turned out to be something to do with the driver not correctly returning the number of parameters. I

Re: camel sql joined query with parameters won't run on sql server

2016-06-26 Thread arno noordover
This seems to be a Microsoft sql server database problem. Have you tried to run this query directly against your database. If you get the same error, you should solve this first. I know that Microsoft sql server support the ansi join syntax: eg: FROM VGMSITE s JOIN VGMLOCATION l ON s.SITENO = l.SIT

Re: camel sql joined query with parameters won't run on sql server

2016-06-25 Thread John Taylor
Hi Ronny, I had the same kind of problem recently and it turned out to be something to do with the driver not correctly returning the number of parameters. I ended up needing to use the parametersCount option. It is described at http://camel.apache.org/sql-component.html Regards, -John Ronny A

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-06-01 Thread imranrazakhan
HI Claus, thanks our suggestions worked perfect, i am currently using ojdbc6 version 12.1.0.2, will verify if its fixed in any other driver. Regards, -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-SQL-IN-Query-issue-2-17-1-tp5783264p5783350.html Sent from the

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-06-01 Thread Claus Ibsen
Hi I wonder if its the Oracle JDBC driver issue, that it does not return correct value for number of parameters in the prepared statement. There is an option parametersCount you can use to set a fixed value if the JDBC driver cannot return correct data. See its documentation http://camel.apache.o

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-31 Thread yogu13
i see unit tests written for supporting in clause not sure how r they passing regards, -Yogesh On Tuesday 31 May 2016, imranrazakhan [via Camel] < ml-node+s465427n5783319...@n5.nabble.com> wrote: > Hi Yogesh, > > it look like there is issue in Using IN queries with dynamic values, as > its worki

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-31 Thread imranrazakhan
Hi Yogesh, it look like there is issue in Using IN queries with dynamic values, as its working for 1 value but not for multiple values, if here is issue in datasource parameter then it should not work for 1 value too. As mentioned earlier is expecting 1 value, below error clearly indicating org

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-31 Thread yogu13
looks like the context for route and context where datasource is set are different and hence datasource is not found.. try setting the datasource first and pass the same camel context to your route builder regards, -Yogesh On Tuesday 31 May 2016, Yogesh Rao wrote: > your datasiyrce is not conf

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-31 Thread yogu13
your datasiyrce is not configured.. can you make sure its working? regards, -yogesh On Tuesday 31 May 2016, imranrazakhan [via Camel] < ml-node+s465427n5783303...@n5.nabble.com> wrote: > Following main class > > Main main = new Main(); > main.addRouteBuilder( new GetAccountStatus

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-31 Thread imranrazakhan
Following main class Main main = new Main(); main.addRouteBuilder( new GetAccountStatusBulk() ); main.getOrCreateCamelContext().getComponent("sql", SqlComponent.class).setDataSource(setupDataSource()); main.run(args); Following change in roue .to(

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-31 Thread yogu13
can you try removing the datasource as a parameter to the sql component and instead set the data source as and check // required for the sql component getContext().getComponent("sql", SqlComponent.class).setDataSource(db); Regards, -Yogesh -- View this message in context: http

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-31 Thread yogu13
instead of simple("12345,56789") can you try new String[]{"12345", "56789"} Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-SQL-IN-Query-issue-2-17-1-tp5783264p5783293.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-31 Thread imranrazakhan
Hi, Same error org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Number of parameters mismatch. Expected: 1, was: 2; nested exception is java.sql.SQLException: Number of parameters mismatch. Expe

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-31 Thread imranrazakhan
Hi Claus, I did some more testing and it works only one scenario from("timer://foo?fixedRate=true&period=6000") .setHeader("mobilenumbers", simple("12345")) .to("sql:select status from subscriber where mobilenumber in (:#in:mobilenumbers)?dataSource=#oracleDS")

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-30 Thread imranrazakhan
As per oracle it support 1000 I tried with 5 records, still same. org.springframework.jdbc.UncategorizedSQLException: PreparedStatementCallback; uncategorized SQLException for SQL []; SQL state [null]; error code [0]; Number of parameters mismatch. Expected: 1, was: 5; nested exception is java.

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-30 Thread Claus Ibsen
Try with lower value than 1000 as that is likely too many values in an IN operator / prepared statement. On Tue, May 31, 2016 at 8:18 AM, imranrazakhan wrote: > Hi Claus Ibsen, > > I tried above code by following this section, Sorry for my ignorance if i m > missing something. > > I am using //

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-30 Thread imranrazakhan
Hi Claus Ibsen, I tried above code by following this section, Sorry for my ignorance if i m missing something. I am using // use a list, and my aggregator is returning ArrayList of strings Following is my custom aggregator code Message newIn = newExchange.getIn(); Object newBody

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-30 Thread Claus Ibsen
See the documentation at http://camel.apache.org/sql-component.html The section: Using IN queries with dynamic values On Mon, May 30, 2016 at 10:09 PM, imranrazakhan wrote: > Hi, > > I am facing following error while using SQL IN clause > > from("file://D:/Activity?fileName=BATCH_11.csv&noop

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-30 Thread yogu13
Hi, Following information will help! 1. CSV contents 2. Camel Version Alternatively you can also check if the CSV component available can be used in your case. Regards, -Yogesh -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-

Re: camel-sql - SQL IN Query issue (2.17.1)

2016-05-30 Thread imranrazakhan
Hi, 1. CSV contents --> i used camel-csv same result 12345 34567 89073 2. Camel Version --> 2.17.1 Regards -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-SQL-IN-Query-issue-2-17-1-tp5783264p5783267.html Sent from the Camel - Users mailing list archive at Nabbl

Re: camel-sql Query with params list

2016-04-01 Thread fabryprog
Hey claus! This feature is included into 2.17.0? /SQL component can now load the SQL queries from external resources so you can use comments and format the queries using multi lines and indents. In addition to that the SQL component now supports SQL IN queries where the IN values are dynamic cal

Re: [CAMEL] Sql-component (producer) removes body when &outputHeader=myHeader is used an result is empty

2016-04-01 Thread Claus Ibsen
EASE > > Thomas > > > > > Von: Claus Ibsen [claus.ib...@gmail.com] > Gesendet: Freitag, 1. April 2016 13:45 > An: users@camel.apache.org > Betreff: Re: [CAMEL] Sql-component (producer) removes body when > &outputHeader=myHeader is used an result is empty > > What

Re: [CAMEL] Sql-component (producer) removes body when &outputHeader=myHeader is used an result is empty

2016-04-01 Thread Claus Ibsen
What version of Camel do you use? On Fri, Apr 1, 2016 at 1:12 PM, Thomas Bender wrote: > Hi, > > I have an issue with the camel sql-component. > > I use the options outputHeader=myHeader and outputType=SelectOne. When the > query returns no result, the body of the Exchange is set to null instead

Re: camel-sql Query with params list

2016-03-04 Thread fabrizio.spataro
I expected your answer. Claus give me some clues. I try to develop it, and then I'll send -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-Query-with-params-list-tp5778544p5778582.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-sql Query with params list

2016-03-03 Thread Claus Ibsen
Hi Yeah IN is not supported. Wonder what a good syntax for that would look like, as you would need to differentiate the values should be enclosed in quotes or not, eg strings vs numbers etc. We have also previously talked about being able to specify the SQL type to use for the parameters. So if

Re: Camel SQL Component with Simple Expression

2016-01-24 Thread NES
Thank you very much, Claus! Your advice is perfect! -- View this message in context: http://camel.465427.n5.nabble.com/Camel-SQL-Component-with-Simple-Expression-tp5776595p5776634.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Camel SQL Component with Simple Expression

2016-01-23 Thread Claus Ibsen
Hi Sounds like this FAQ http://camel.apache.org/why-is-my-message-body-empty.html http://camel.apache.org/servlet On Sat, Jan 23, 2016 at 3:23 PM, NES wrote: > Hello, > I am trying to implement a function like a HTTP proxy with Apache Camel. > In my proxy, I want to insert a header value in DB,

Re: Camel SQL Using JNDI and Connecting to Schema other than default Schema

2015-08-20 Thread Claus Ibsen
Maybe try as a as shown here http://stackoverflow.com/questions/9183321/how-to-use-jndi-datasource-provided-by-tomcat-in-spring I dont know how jndi-lookup is implemented in spring. But all Camel does is to ask the spring app context to lookup beans with the name of the datasource you configure o

Re: Camel SQL Using JNDI and Connecting to Schema other than default Schema

2015-08-20 Thread vivekrao001
Is the above problem is a bug or I'm doing it wrong? Thanks, Vivek. -- View this message in context: http://camel.465427.n5.nabble.com/Camel-SQL-Using-JNDI-and-Connecting-to-Schema-other-than-default-Schema-tp5770854p5770860.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel sql outputType=SelectList is giving errors

2015-05-21 Thread Henryk Konsek
Hi, Option outputType has SelectList by default. Does it mean that your endpoint always fail or only when you set outputType=SelectList explictly. Cheers. czw., 21.05.2015 o 10:51 użytkownik chaituu napisał: > using 2.14.1 version... > > > > > > > > In the bean

Re: Camel-sql dynamic from ?

2015-02-22 Thread Claus Ibsen
On Sun, Feb 22, 2015 at 9:06 PM, Reji Mathews wrote: > Hi Claus. Can't we use the route builder api to create dynamic routes on > the fly ! > Yes surely you can. Though you would need to manage those additional routes, eg if they are no longer needed you would need to stop and remove them. > Che

Re: Camel-sql dynamic from ?

2015-02-22 Thread Reji Mathews
Hi Claus. Can't we use the route builder api to create dynamic routes on the fly ! Cheers Reji On 21 Feb 2015 23:34, "Claus Ibsen" wrote: > Hi > > No this is not possible. > > Instead use a timer / scheduler and then use a "dynamic to" to call > the SQL, which can be dynamic. > http://camel.apac

Re: Camel-sql dynamic from ?

2015-02-21 Thread Claus Ibsen
Hi No this is not possible. Instead use a timer / scheduler and then use a "dynamic to" to call the SQL, which can be dynamic. http://camel.apache.org/how-to-use-a-dynamic-uri-in-to.html On Sat, Feb 21, 2015 at 5:19 PM, rwijngaa wrote: > Hi, > > Is it possible to use a dynamic from() in camel 2

Re: [Camel SQL] CamelSqlRetrieveGeneratedKeys attribute delete all headers

2015-02-10 Thread fabrizio.spataro
Thanks to resolve the issue: https://issues.apache.org/jira/browse/CAMEL-8329 I am testing now! -- View this message in context: http://camel.465427.n5.nabble.com/Camel-SQL-CamelSqlRetrieveGeneratedKeys-attribute-delete-all-headers-tp5762512p5762544.html Sent from the Camel - Users mailing lis

Re: [Camel SQL] CamelSqlRetrieveGeneratedKeys attribute delete all headers

2015-02-10 Thread fabrizio.spataro
Hello, i am using batch value. This seems to work but i lost transactional functionality. So.. i am creating the issue into JIRA My settings are: false false

Re: [Camel SQL] CamelSqlRetrieveGeneratedKeys attribute delete all headers

2015-02-10 Thread Claus Ibsen
Hi Yes its a bug. I was fixing another issue in camel-sql, so I logged a ticket and fixed this https://issues.apache.org/jira/browse/CAMEL-8329 On Mon, Feb 9, 2015 at 5:40 PM, fabrizio.spataro wrote: > Hello everyone, > > I am using Camel (2.14.1) SQL component, with > *CamelSqlRetrieveGenerated

Re: [Camel SQL] CamelSqlRetrieveGeneratedKeys attribute delete all headers

2015-02-09 Thread Grzegorz Grzybek
Are you using batch statements? (batch=true in endpoint URI) We do copy headers IN→OUT ( https://github.com/apache/camel/blob/camel-2.14.x/components/camel-sql/src/main/java/org/apache/camel/component/sql/SqlProducer.java#L124-L125) but it seems only in non-batch mode. If this is a case (or if it

Re: camel sql, select is returning many exchanges of type map instead of one List>

2014-11-20 Thread dermoritz
I just can say thanks! (by the way all in all camel i the best api i ever worked with) -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-select-is-returning-many-exchanges-of-type-map-instead-of-one-List-Map-tp5759374p5759406.html Sent from the Camel - Users mailing

Re: camel sql, select is returning many exchanges of type map instead of one List>

2014-11-20 Thread Claus Ibsen
Hi That is the expected behavior when using the consumer. See the useIterator option in the docs http://camel.apache.org/sql-component On Thu, Nov 20, 2014 at 5:44 PM, dermoritz wrote: > I just tried out camel-sql component (with mysql datasource). > > The documentation states that select querie

Re: Camel SQL component - Insert Operation

2014-11-13 Thread Pontus Ullgren
According to the documentation the syntax should be ":#data" so it looks like you have switched places on the : and # On Fri, Nov 14, 2014 at 3:49 AM, contactreji wrote: > Hi > > I am trying to insert a record into the camel database. I have no errors > when I hard code the value like ** > > > I

Re: Camel SQL component - Insert Operation

2014-11-13 Thread Claus Ibsen
Hi You need Camel 2.11 or better to use named parameters as said here http://camel.apache.org/sql-component On Fri, Nov 14, 2014 at 3:49 AM, contactreji wrote: > Hi > > I am trying to insert a record into the camel database. I have no errors > when I hard code the value like ** > > > I was wonde

Re: camel sql component

2014-05-21 Thread Poyan G
created jira https://issues.apache.org/jira/browse/CAMEL-7455 My route finish:s after the sql insert, so I guss nothing happens after that. 2014-05-21 9:14 GMT+02:00 Pontus Ullgren : > Hi, > > I'm just fine. > > Provided that you do this only within one route and do not > pass the message over

Re: camel sql component

2014-05-21 Thread Pontus Ullgren
Hi, I'm just fine. Provided that you do this only within one route and do not pass the message over any external protocol (such as JMS) with the headers there should not be much overhead since the header value is a reference to the same String object. So make sure to set the header just before t

Re: camel sql component

2014-05-20 Thread Claus Ibsen
On Tue, May 20, 2014 at 11:34 PM, Poyan G wrote: > Hello Pontus, > How are you ? :) > Actually that was the way I solved it, but I field that it should be an > better solution on it, > I don't now how much overhead it is to set the body as a header ? > I think it should be an better way to set the

Re: camel sql component

2014-05-20 Thread Poyan G
Hello Pontus, How are you ? :) Actually that was the way I solved it, but I field that it should be an better solution on it, I don't now how much overhead it is to set the body as a header ? I think it should be an better way to set the body in the sql statement. Thanks 2014-05-20 23:20 GMT+02

Re: camel sql component

2014-05-20 Thread Pontus Ullgren
Hello Poyan, You could try something like this to assign a header the value of the body and then use the header name. -- http://camel.apache.org/schema/spring";> id body -- Hope this helps // Pontus On Tue, May

Re: Camel SQL compnent - Return

2014-01-27 Thread Dharmendra Patel
Hi There, For select operations, the returned result is an instance of List> type, as returned by the JdbcTemplate.queryForList() method. For update operations, the result is the number of updated rows, returned as an Integer. In a processor you can access them as below: List> exchangeBody = exc

Re: camel-sql, connection test required?

2013-08-01 Thread Marco Crivellaro
Thanks for pointing that out, I'll have a look at it. -- View this message in context: http://camel.465427.n5.nabble.com/camel-sql-connection-test-required-tp5736549p5736624.html Sent from the Camel - Users mailing list archive at Nabble.com.

Re: camel-sql, connection test required?

2013-07-31 Thread Christian Müller
Apache commons dbcp [1] is more common IMO. [1] http://commons.apache.org/proper/commons-dbcp/ Best, Christian - Software Integration Specialist Apache Camel committer: https://camel.apache.org/team V.P. Apache Camel: https://www.apache.org/foundation/ Apache Member: https://www

Re: camel-sql, connection test required?

2013-07-31 Thread Marco Crivellaro
I've found out you can use c3p0 library (http://www.mchange.com/projects/c3p0) so you can rely on connection pooling are not forced to write your own connection testing in the route. here is an example of the jdbc datasource bean:

Re: camel-sql, connection test required?

2013-07-31 Thread Claus Ibsen
Hi Yeah your connection pool may allow to setup keep alive queries or test the connection before handing it over to the client. There is no logic in camel-sql for validating the connection. You can use Camels error handler to retry also which then would get a new connection from the data source e

Re: Camel SQL component - How configure sql component to doesn't try read the body?

2013-03-20 Thread Gardella juan
Oki, thanks Claus for answer. I 've created the jira https://issues.apache.org/jira/browse/CAMEL-6186. 2013/3/20 Claus Ibsen-2 [via Camel] < ml-node+s465427n5729482...@n5.nabble.com> > Hi > > Yeah that seems like a good improvement. Feel free to log a JIRA ticket > http://camel.apache.org/contri

Re: Camel SQL component - How configure sql component to doesn't try read the body?

2013-03-20 Thread Claus Ibsen
Hi Yeah that seems like a good improvement. Feel free to log a JIRA ticket http://camel.apache.org/contributing.html And patches is of course welcome. On Tue, Mar 19, 2013 at 6:31 PM, Gardella juan wrote: > Hi, > > I have a route that is processing a file. So the body is an input stream. I > w

Re: camel sql

2013-01-12 Thread Christian Müller
camel-sql doesn't support changing the sql query by passing a special header. Checkout the documentation [1]. If you have a need for this, feel free to log a JIRA [2]. [1] http://camel.apache.org/sql-component.html [2] http://camel.apache.org/contributing.html Best, Christian On Sat, Jan 5, 2013

Re: camel sql

2013-01-12 Thread Christian Müller
Please find my commets inline: On Sat, Jan 5, 2013 at 6:56 AM, pointerness wrote: > Hi, > I am evaluating camel for our product. I am trying to use a camel route in > an existing web application. > We use spring-jdbc queryforlist to fetch data from DB. I thought camel's > sql > component should b

Re: camel sql

2013-01-05 Thread Claus Ibsen
On Sat, Jan 5, 2013 at 10:52 AM, pointerness wrote: > Yep worked with 3.0. Thanks. Worked with sql query stored in a property file. > not with header. > I have put a map entry with key"sqlQuery". I use the map as the header > argument to producerTemplate request body and header method. Am trying t

Re: camel sql

2013-01-05 Thread Claus Ibsen
On Sat, Jan 5, 2013 at 9:00 AM, pointerness wrote: > Hi, > I have tried using both dynamic and static queries. The exact error I now > get is NoSuchMethodError. for > org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(Jjava/sql/ResultSet;)Ljava/util/List > > From stack trace i c

Re: camel sql

2013-01-05 Thread pointerness
Hi, I have tried using both dynamic and static queries. The exact error I now get is NoSuchMethodError. for org.springframework.jdbc.core.RowMapperResultSetExtractor.extractData(Jjava/sql/ResultSet;)Ljava/util/List >From stack trace i can see query has been executed. Now the spring jdbc packages

Re: camel sql

2013-01-04 Thread Willem jiang
Hi, What's you sql looks like? Did you need to change it dynamically? camel-sql support to use the query from message header with "CamelSqlQuery" which you can change the value dynamically. -- Willem Jiang Red Hat, Inc. FuseSource is now part of Red Hat Web: http://www.fusesource.com | http:

Re: camel sql insertion is not working in osgi

2010-02-17 Thread NagendraCorpus
Hi, priyambada, me also facing same issue , if u get any solution please reply . Thanks, Nagendra. Claus Ibsen-2 wrote: > > Hi > > Please read this page to better report issues at the user form > http://camel.apache.org/support.html > > And why dont you just use a POJO to access the database

Re: camel sql insertion is not working in osgi

2010-02-16 Thread Claus Ibsen
Hi Please read this page to better report issues at the user form http://camel.apache.org/support.html And why dont you just use a POJO to access the database, that is much easier. For example using spring JDBC. Because in your use case you need to bind multiple values to the SQL statement which