I logged a ticket https://issues.apache.org/jira/browse/CAMEL-9906
On Fri, Apr 22, 2016 at 12:37 PM, Claus Ibsen <claus.ib...@gmail.com> wrote: > Hi > > You are welcome to try to provide a PR to fix this > http://camel.apache.org/contributing > > On Fri, Apr 22, 2016 at 12:28 PM, Arapov, Artem > <artem.ara...@teradata.com> wrote: >> Hi, >> >> I've recently tried out new 2.17.0 version from 2.16.1 and discovered a bug >> with named parameters and null values in SQL component. >> I use CamelSqlQuery header to set the query with named parameters as >> ":?param". Values for that parameters are stored in message body (map). >> Problem occurs when such map contains a NULL value for key "param" - camel >> throws exception "Cannot find key [param] in message body or headers...". >> When value is not null - everything working as expected. Looking at >> DefaultSqlPrepareStatementStrategy class (at Github) it's quite obvious - >> when "lookupParameter" (line 267) function returns null (even if key exists, >> but value is null!) next check (line 271) throwing error. Which I suppose is >> not correct behavior. >> > > > > -- > Claus Ibsen > ----------------- > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 -- Claus Ibsen ----------------- http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2