search cancel

Call to MySQL procedure from JDBC Step post 10.6 upgrade fails with parameter number 1 is not an OUT parameter

book

Article ID: 202191

calendar_today

Updated On:

Products

CA Cloud Test Mobile CA Application Test

Issue/Introduction

After an upgrade to DevTest 10.6, a JDBC step with call to a MySQL stored procedure with OUT parameter fails with the following error:
java.sql.SQLException: Parameter number 1 is not an OUT parameter
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:89)
    at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:63)
    at com.mysql.cj.jdbc.CallableStatement.checkIsOutputParam(CallableStatement.java:643)
    at com.mysql.cj.jdbc.CallableStatement.registerOutParameter(CallableStatement.java:1714)
    at com.mysql.cj.jdbc.CallableStatement.registerOutParameter(CallableStatement.java:1722)
    at com.itko.lisa.jdbc.JDBCMode$2.setParameterMode(JDBCMode.java:40)
    at com.itko.lisa.jdbc.JDBCNode.makeStoredProcCall(JDBCNode.java:535)

Example stored procedure:
delimiter //
CREATE PROCEDURE `testdbproc`(OUT output varchar(100))
BEGIN
set output = "hello world";
END//
delimiter ;

 

JDBC step:
{call testdbproc(?)}

Environment

Release : 10.6

Component : CA Service Virtualization

Resolution

In the SQL Statement panel, instead of using:
{call thedemo_pro( ? )}

Now just use:
call thedemo_pro

You still need specify the parameters below that as before.