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