RPC Returns Fewer Output Parameters Than Registered

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.
Make sure you have declared all of the appropriate parameters as “OUTPUT.” Look at the line of code that reads:
 create procedure yourproc (@p1 int OUTPUT, ...
Note: If you receive this error while using SQL Anywhere, upgrade to SQL Anywhere version 5.5.04 or later.