how to execute sql() routine of JJUPIN to save data in database


I have a procedure in oracle db which insert new data on a custom table and a commit at the end. Calling this procedure directly from my db tool(toad) it works fine.

But using JJUPIN sql() routine in a SIL script and calling it from SIL RUNNER Gadget, it doesnt work.

Is it possible to execute insert statement with sql() routine from Sil Runner Gadget?

sqlDo = "execute CUSTOM_PKG.INSERTDATA('test')";
sqlResult = sql("JiraDB", sqlDo);


I have been using sql() routine and Sil Runner Gadget successfully many times but just querying data from external table.



3 answers

1 accepted

3 votes
Accepted answer

OK, how about trying such script?:

string param1 = "'test'";
string sqlDo = "begin CUSTOM_PKG.INSERTDATA("+param1+"); end;";
string[] sqlResult = sql("JiraDB", sqlDo);

Hi Eric,


You have a procedure there. You have to use a different routine for that: If you need out params, check the very similar routine designed for this task.




Hi Silviu, how do i do this in JJUPIN 2.6? Regards,

Hi Eric, The routine is available since JJUPIN 3.0. I suggest you to update to JJUPIN 3.0 since, in addition to bugfixes, we also added lots of features, including structures and error handling in SIL language. Alexandra

Hi Alexandra, We will upgrade but not yet this time, do we have any other way to execute a procedure from Sil Runner Gadget? a workaround perhaps? Regards,

Short answer: no workaround Long answer: There is routine, if you can manage to invoke an sql command using it, you have the solution for your problem.

Thanks I'll give it a try...

What type of data are your parameters?

You can try this way:


string param1 = "'test'";
string sqlDo = "execute CUSTOM_PKG.INSERTDATA("+param1+")";
string[] sqlResult = sql("JiraDB", sqlDo);

Hi Blazej, I even tried a procedure without parameter, just directly insert and commit, it just doesnt work. Probably need to upgrade for this routine sqlCallStoredProcedure. Regards,

Damn, maybe that's because Oracle handles it differently. We use above approach a lot in MS SQL and it works OK. Are you absolutely sure, that db user used in the JNDI source have permission to execute procedures and/or write data?

yup, user used on JNDI/DB Tool is the same, and it works when using DB Tool.

Hi Blazej, Can you share how you define your JNDI source?

Sure, however it's a congiuration to ms sql, not oracle: <Resource name="myJNDIname" auth="Container" type="javax.sql.DataSource" username="myDBuser" password="myDBpassword" driverClassName="net.sourceforge.jtds.jdbc.Driver" url="jdbc:jtds:sqlserver://mySERVERaddress" />

its same with ours.. :(

Ok, one more thought. Have you looked into the logs? What response do you get when you try to call the procedure?

This is the error log, any idea? 2015-08-13 18:54:14,894 pool-15-thread-1 ERROR eric1000 582x2403x1 jxc0go /rest/keplerrominfo/jjupin/latest/rungadget/run [commons.sil.routines.SQLRoutine] Could not execute SQL >>execute PKG.INSERTDATA('Test')<< on database JiraDB. java.sql.SQLSyntaxErrorException: ORA-00900: invalid SQL statement at oracle.jdbc.driver.T4CTTIoer.processError( at oracle.jdbc.driver.T4CTTIoer.processError(

wow... it works.. thanks a lot

Point for google :> I've never used oracle in my life, just googled it up :D I'm glad it works :) I'll convert the above comment to an answer, someone might use it in future :)

P.S. If my answer was helpful and worked, please, accept it as an answer to your question :)

sure, convert it to answer..

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Nov 27, 2018 in Portfolio for Jira

Introducing a new planning experience in Portfolio for Jira (Server/DC)

In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to   have–in   order to produce a reliable long-term roadmap. We're tur...

2,919 views 19 22
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you