Skip to main content

Hi,

Am trying to insert the json payload as blob data in oracle table via DB insert query. But am getting error "org.mule.extension.db.api.exception.connection.QueryExecutionException: ORA-06553: PLS-306: wrong number or types of arguments in call to 'CAST_TO_RAW'".

 

Any suggestions on this please?

 

DB query:

insert into test(id, payload) values(id,utl_raw.cast_to_raw(payload))

6 answers
  1. Mar 4, 2021, 8:07 AM

    You should make sure to convert the file to binary[] , try using application/octet-stream. Make sure you are using the latest mule-db-connector. Then simply pass the parameter , something like,

     

    SQL Query Text:

    insert into table (ID, DOCUMENT) values(:id,:document)

     

    Input Parameters:

     

    {

      id: '1',

      document: payload // given this payload has been transformed to application/octet-stream

    }

     

    if above do not work, try to convert the data to Oracle RAW type, can be done using custom java code.

     

    Thanks :)

0/9000