Hi, Verified and filed a JIRA. https://issues.apache.org/jira/browse/CAMEL-10499
Thanks, Tomo On 11/20/2016 08:50 PM, imranrazakhan wrote:
Hi, 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, i replaced msisdn with static value and it works fine, select * from subscriber s where status NOT IN(7,8) AND s.msisdn IN( :#in:msisdns ) AND s.campaign_id IN( :#in:campId ) Suspected Issue: I enabled trace and verify resulted Query and found that campaign_id should have 3 placeholder but it has two like msisdn, which mean prepareQuery method of DefaultSqlPrepareStatementStrategy.java is setting placeholder like msisdn TRACE DefaultSqlPrepareStatementStrategy:88 - Prepared query: select * from subscriber s where status NOT IN(7,8) AND s.msisdn IN( ?,? ) AND s.campaign_id IN( ?,? ) Stacktrace --------------------------------------------------------------------------------------------------------------------------------------- org.springframework.jdbc.BadSqlGrammarException: PreparedStatementCallback; bad SQL grammar []; nested exception is java.sql.SQLSyntaxErrorException: ORA-00942: table or view does not exist at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.doTranslate(SQLErrorCodeSQLExceptionTranslator.java:231) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslator.translate(AbstractFallbackSQLExceptionTranslator.java:73) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:649) at org.apache.camel.component.sql.SqlProducer.process(SqlProducer.java:116) -- View this message in context: http://camel.465427.n5.nabble.com/Bug-in-camel-sql-IN-Clause-2-18-0-tp5790243.html Sent from the Camel - Users mailing list archive at Nabble.com.