I am trying to call an oracle database function. The input is a CLOB and the output is a String value (status). Here is the code: payload is a Clob.
<jdbc-ee:outbound-endpoint exchange-pattern="request-response" queryKey="UpdateError" queryTimeout="-1" connector-ref="DatabaseNCS" doc:name="Database">
<jdbc-ee:query key="UpdateError"
value="Call #[output;string;out] := dbpk_bxf_media.track_pse_errors(#[message.payload])"/>
</jdbc-ee:outbound-endpoint>
I do not get the expected output "OK". This works without any issues when I write a custom java code. Here is the output log (Note the output is ORA-22922: nonexistent LOB value): I would like to know what I am doing wrong and any way to fix this issue. Thanks!
CallableSqlCommandExecutor: SQL: { Call ? := dbpk_bxf_media.track_pse_errors(?) } input params: [oracle.sql.CLOB@1fbb2176]
CallableSqlCommandExecutor: Registering output parameters for: { Call ? := dbpk_bxf_media.track_pse_errors(?) }
CallableSqlCommandExecutor: Executing: { Call ? := dbpk_bxf_media.track_pse_errors(?) }
CallableSqlCommandExecutor: Command executed successfully: { Call ? := dbpk_bxf_media.track_pse_errors(?) }
CallableSqlCommandExecutor: Processing resultSets for: { Call ? := dbpk_bxf_media.track_pse_errors(?) }
CallableSqlCommandExecutor: Processed resultsets: 0
CallableSqlCommandExecutor: Processing output parameters for: { Call ? := dbpk_bxf_media.track_pse_errors(?) }
ExecuteSqlStatementStrategy: Obtained result: {output=ORA-22922: nonexistent LOB value}