cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Highlighted
Contributor

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

1 ACCEPTED SOLUTION

Accepted Solutions
Community Hero

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

5 REPLIES 5
Highlighted
Community Hero

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

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?

Thirdly....you 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,

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Contributor

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

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
Highlighted
Community Hero

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

What version of oracle?

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

Ta

Rich
if this helped answer the post, could you please mark it as 'solved'? Also if you consider whether the title of your post is relevant? Perhaps if the post is solved, it might make sense to update the Subject header field of the post to something more descriptive? This will help people when searching for problems. Ta
Highlighted
Community Manager

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

Thank you for your efforts Richie! Appreciated!

 

@shubhimu were you able to solve this? If not, let's try to continue the investigation here. Looks like Richie might have an idea about what is going on, they just need more info from you.

 

You can try raising a support ticket here.

 


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
Community Hero

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

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors