Reputation: 388
I am trying to call Oracle PL/SQL procedure with Mybatis in Spring project. However I am getting below error: Caused by: java.sql.SQLException: ORA-06553: PLS-306: wrong number or types of arguments in call to
Problem is with boolean parameter because when I remove it it works well. (process_now parameter is optional in procedure) The stored procedure works well when I am calling it with SQL Developer.
<select id="processUser" statementType="CALLABLE" parameterType="UserResult">
CALL myprocedure(
user_id => #{userId, jdbcType=NUMERIC, mode=IN},
description => #{description, jdbcType=VARCHAR, mode=IN},
process_now => #{processNow, jdbcType=BOOLEAN, mode=IN},
response => #{response, jdbcType=NUMERIC, mode=OUT}
)
What could be the problem?
Upvotes: 0
Views: 905
Reputation: 388
I solved the issue by creating new custom wrapper procedure and declaring boolean variables within it. Then I passed those declared variables to my original procedure. That solved my problem.
Here is the link to page: (Read 'Wrapping PL/SQL BOOLEAN, RECORD, and TABLE Types' part) https://docs.oracle.com/cd/F49540_01/DOC/java.815/a64684/typesup1.htm
Upvotes: 0