Hello,
I have a route which contains a list of objects in the body and I am trying to
call sql-stored store procedure with batch enabled as below
.....
.to("sql-stored:classpath:sql/database_template.sql?dataSource=dataSource&batch=true)
.end();
This is my database_template.sql
MY_STORE_PROCEDURE(
VARCHAR ${body.messageName},
VARCHAR ${body.sysAppCode},
VARCHAR ${body.strategyPortId},
VARCHAR ${body.frontOfficeBook},
VARCHAR ${body.holdingCurrency},
VARCHAR ${body.groupName},
VARCHAR ${body.orgId},
VARCHAR ${body.extId}
)
If I use .split(body()), before calling the store procedure like below, then it
works.
.split(body())
.to("sql-stored:classpath:sql/database_template.sql?dataSource=dataSource&batch=true)
.end();
But it defeats the batch purpose, if I call without split, it gives me this
error
org.apache.camel.language.bean.RuntimeBeanExpressionException: Failed to invoke
method: messageName on null due to:
org.apache.camel.component.bean.MethodNotFoundException:
How do I define database_templatesql, so it will process the ArrayList of
objects.
Kind regards,
Sunil Keyal
---
This communication may contain confidential and/or privileged information. If
you are not the intended recipient (or have received this communication in
error) please notify the sender immediately and destroy this communication. Any
unauthorized copying, disclosure or distribution of the material in this
communication is strictly forbidden.
Deutsche Bank does not render legal or tax advice, and the information
contained in this communication should not be regarded as such.