Forum Discussion

shubhimu's avatar
4 years ago

Ready APi Not able to run procedure with clob output type parameter in it


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{ ('{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{ ('{call GET_OPEN_ORDER(?, ?, ?,?,?)}', ['80469098630', 'CALL_CENTER', Sql.VARCHAR, Sql.INTEGER, Sql.VARCHAR]) {

results -> 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.




5 Replies

  • richie's avatar
    Community Hero
    Hey shubhimu

    I dont know whether i can help but i'll try cos it doesnt look like anyone has any ideas on this.

    Firstly...this is sqlserver not oracle right? (cos sqlserver doesn't have a clob datatype and i havent seen try/catch in oracle before)

    Secondly you need to specify the type of the column for the clob type, right? So if sql server doesnt have clob type, but clob type data is instead stored in either NVARCHAR(max) or VARCHAR(max), rather than sql.VARCHAR, have you tried sql.VARCHAR(max) in your sql? said you're trying to execute the proc via groovy.....have you tried running the proc via a JDBC step instead?

    That's all the ideas i have im afraid!

    Nice one,

    • shubhimu's avatar
      Thanks for your reply.

      The database I am using is oracle and the way you mentioned is not working for me because my db is not sql I guess that's the reason
      • richie's avatar
        Community Hero
        What version of oracle?

        I would expect you to be able to specify the clob type if oracle....