"Missing IN or OUT parameter at index:: 3" Calling a procedure
M.NasirMay 12 2012 — edited May 12 2012Hello,
Dear All I have searched the forum before posting my problem but I cannot find any helpful solution so Please help.
I followed this Post and did it http://sameh-nassar.blogspot.com/2010/01/create-plsql-function-and-call-it-from.html
but after this I edit it little bit and convert it into a procedure which is;
create or replace PROCEDURE xim_req
(reqID IN XIM_PURCHASE_REQUISITIONS.req_id%TYPE,
rreqID OUT XIM_PURCHASE_REQUISITIONS.req_status%TYPE
)
IS
BEGIN
Select req_status into rreqID from XIM_PURCHASE_REQUISITIONS
Where req_id=reqID;
END xim_req;
And my java code in Impl class is
public String getReqID(int reqID){
CallableStatement cs=null;
try{
cs=getDBTransaction().createCallableStatement("begin ? := xim_req(?,?); end;",0);
cs.setInt(1, reqID);
cs.registerOutParameter(2, Types.VARCHAR);
cs.executeUpdate();
return cs.getString(2);
}catch(SQLException e){
throw new JboException(e);
}
}
and On jsf page behind button code is
public String cb1_action() {
BindingContainer bindings = getBindings();
OperationBinding operationBinding = bindings.getOperationBinding("getReqID");
Object result = operationBinding.execute();
System.out.println("Result= " + result);
if (!operationBinding.getErrors().isEmpty()) {
return null;
}
return null;
}
but after running this page I am getting this error "Missing IN or OUT parameter at index:: 3" Please help me
thanks