I'm very new to java and spring frame work, and i'm currently working on a java code enhancement program
And i'm having some trouble when calling the oracle package.
any help will be much appreciated ! thanks
Below is the error occurs:
the error occurs when the package is called,
the package name stored as below:
and the package is called by using simpleJdbcCall:
the package generates and return a set_nbr and the error occurs at this line:
i'm wondering is there anyway to write this variable : String n_setNum = (String)sjc.executeFunction(Class.forName("java.lang.String"));
as Integer ?
because it is going to store in integer and call another class
Nathan Pruett wrote:That error occurs because the parameters you're trying to use to call the stored procedure don't match the parameters that are actually declared on the stored procedure - either it expects some "in" parameters you aren't providing, or the the "out" parameter is declared as a different type than "String".
Hi, thank you for your reply!
are you saying that the String n_setNum = (String)sjc.executeFunction(Class.forName("java.lang.String")); is a different type as the "out" inside the oracle package?
is there anyway I can write String n_setNum = (String)sjc.executeFunction(Class.forName("java.lang.String")); as an integer ?
You can try to specify the out parameter when you're creating the SimpleJdbcCall -
Second, I think supplying java.lang.Integer will attempt to cast the value returned to an Integer - but you can try to do this yourself to see if it's causing the problem -