Ready APi Not able to run procedure with clob output type parameter in it
Hi,
I am able to connect to db using groovy but when i am trying to run procedure using groovy then its coming in the catch block. It has 2 input and 3(1 as CLOB type, 1 as Integer, 1 as Varchar) out parameters
And If i use getMessage method in the catch method then its giving me the xml which i am supposed to get but.with the below error message.
ERROR: Execption occuredNo signature of method: Script87$_run_closure1.doCall() is applicable for argument types:
(java.lang.String, java.lang.String, java.lang.String) values:
Can anyone please let me know how can i handle CLOB output type here as i think i am getting above error message because i am passing SQL.VARCHAR in the below highlighted instead of some way to identify CLOB output parameter.
I tried SQL.CLOB but its not a valid column type
Syntax to run the proc which return code as 1 and dnt go in to catch block:
try{ sql.call ('{call GET_OPEN_ORDER(?, ?, ?,?,?)}', ['80469098637', 'CALL_CENTER', Sql.VARCHAR, Sql.INTEGER, Sql.VARCHAR]) } catch (e){ log.error "Execption occured"+e.getMessage() }
Syntax to run the proc which goes in to catch block:
try{ sql.call ('{call GET_OPEN_ORDER(?, ?, ?,?,?)}', ['80469098630', 'CALL_CENTER', Sql.VARCHAR, Sql.INTEGER, Sql.VARCHAR]) {
results ->log.info results
}
} catch (e){ log.error "Execption occured"+e.getMessage() }
Kindly let me know how can i handle CLOB output paramete using groovy so that i dont get exception message as mentioned above.
Thanks,
Himanshu
- Please check if the below link helps!
https://stackoverflow.com/questions/50075592/how-to-get-clob-data-type-from-oracle-to-resultset-in-java