Skip to Main Content

Java Development Tools

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

"Missing IN or OUT parameter at index:: 3" Calling a procedure

M.NasirMay 12 2012 — edited May 12 2012
Hello,
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
This post has been answered by Timo Hahn on May 12 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2012
Added on May 12 2012
2 comments
4,692 views