| Author |
Error using Spring to call Oracle stored procedure
|
J Miller
Ranch Hand
Joined: Oct 21, 2010
Posts: 62
|
|
We're using the spring framework to call an Oracle stored procedure, and it's giving me an error saying "wrong number or types of arguments in call". Here's what my dao looks like:
The spec for my stored procedure is:
So my stored proc has 1 input, and 1 output parameters. I'm only passing in a single input parameter, so I'm not sure why I'm getting that error. Any ideas?
|
 |
William P O'Sullivan
Ranch Hand
Joined: Mar 28, 2012
Posts: 860
|
|
I think you need to declare all parameters, IN,INOUT or OUT
WP
|
 |
J Miller
Ranch Hand
Joined: Oct 21, 2010
Posts: 62
|
|
I've updated the CriteriaStoredProcedure method to include the in parameter, and it doesn't seem to have made a difference. Still getting the same error. The only thing I can think of is that the datatype of the input param in Oracle is VARCHAR2, but there's no type for that under oracle.jdbc.OracleTypes.
|
 |
J Miller
Ranch Hand
Joined: Oct 21, 2010
Posts: 62
|
|
|
Found the problem. In my retrieveCriteria method, I had the name of the output cursor wrong. In Oracle it's "out_cursor", in that method I named it "output_cursor". Simple mistake.
|
 |
 |
|
|
subject: Error using Spring to call Oracle stored procedure
|
|
|