missing IN or OUT parameter at index : 5
699712May 5 2009 — edited Jan 31 2011Hi All,
Need help in resolving one of the customers P1 bug# 8466103
SQL EXCEPTION OCCOURED:MISSING IN AND OUT PARAMETER AT INDEX - 5
Following is the piece of code from CreditCardProcessor.java, where the
Exception is being thrown in
// get a connection object
c = DBWrapper.getDBConnection();
//prepare the statement
callPlSql=(OracleCallableStatement)
c.prepareCall(CcCallConstants.UNIQ_ORDERID_CALL());
//"begin iby_querycc_pkg.CheckUnqOrder(?,?,?,?,?, ?,?,?); end;");
//Fill in the parameters to be passed to the procedure
callPlSql.setString(1,orderid);
callPlSql.setString(2,merchantid);
callPlSql.setString(3,pmtoperation);
callPlSql.setInt(4,trxntype);
callPlSql.registerOutParameter(5,Types.INTEGER);
callPlSql.registerOutParameter(6,Types.VARCHAR);
callPlSql.registerOutParameter(7,Types.INTEGER);
callPlSql.registerOutParameter(8,Types.VARCHAR);
callPlSql.registerOutParameter(9,Types.INTEGER);
callPlSql.registerOutParameter(10,Types.VARCHAR);
if (Log.isEnabled(DBG_MOD,Log.INFO))
{
Log.debug(operationType + "09",Log.INFO,DBG_MOD);
Log.debug(operationType
+ "values for checkUnqOrder are" + " order id =" +
orderid + " merchantid = " + merchantid +
" pmtoperation = " + pmtoperation
+ " trxntype = " + trxntype,
Log.INFO,DBG_MOD);
}
//Execute the procedure
long timein = System.currentTimeMillis();
callPlSql.execute(); --> Exception is occurring at this line
Log.debug("CreditCardProcessor-->checkunq-->plsql",Log.INFO,DBG_MOD);
CcCallConstants.UNIQ_ORDERID_CALL()
---------------------------------------------------------
public final static String UNIQ_ORDERID_CALL()
{ return "BEGIN iby_querycc_pkg.CheckUnqOrder(:1,:2,:3,:4,:5,:6,:7,:8,:9,:10); END;"; }
/*
*
* PROCEDURE checkUnqOrder
* (
* 1. order_id_in IN VARCHAR2,
* 2. merchant_id_in IN VARCHAR2,
* 3. payment_operation IN VARCHAR2,
* 4. trxn_type_in IN NUMBER, * no longer used
* 5. check_status_out OUT NUMBER,
* 6. parent_trace_number_out OUT VARCHAR2 * no longer set
* 7. bepid_out OUT NUMBER,
* 8. bepkey_out OUT VARCHAR2,
* 9. trxnid_out OUT NUMBER
* 10. trxnref_out OUT VARCHAR2
* )
*
Log summary :
[iby.payment.CreditCardProcessor.processTrxn]:java.sql.SQLException: Missing IN or OUT parameter at index:: 5
-----------------------------------------------------------------------------------------------------------------------------------------------------------
The exception is occurring only when the request is coming from Order Management, the request from other
modules such as AR is successful. Same class (CreditCardProcessor.java) is being used in both the requests.
------------------------------------------------------------------------------------------------------------------------------------------------------------
Though we have registered out put parameter at index 5, callPlSql.registerOutParameter(5,Types.INTEGER);
why this is getting errored out as Missing IN or OUT parameter at index:: 5
Can any one tell why its happening?