If you call CallableStatement.registerOutParam for more parameters than you have declared as OUTPUT parameters in the stored procedure, an error occurs.
SQLState: JZ0SG - An RPC did not return as many output parameters as the application had registered for it.
create procedure yourproc (@p1 int OUTPUT, ...