Hi , I have a stored procedure as follows
CREATE OR REPLACE PACKAGE BODY Pkg_name
IS
PROCEDURE proceure_Name (
Id IN Long,
startDate IN DATE,
EndDate IN DATE,
Table1 OUT Table1_Name%ROWTYPE,
Table2 OUT Table2_Name%ROWTYPE,
errormsg OUT VARCHAR2)
IS
Record another_Table%ROWTYPE;
I am using my test class to call this procedure
@Test
public void procedure9_2() throws ParseException, HibernateException {
SessionFactory sessionFactory = this.getEntityManager().unwrap(Session.class).getSessionFactory();
EntityManager em = sessionFactory.createEntityManager();
Long id = 417478732001288L;
Date startDate = setDateTime("08/31/2023 00:00:00");
Date endDate = setDateTime("09/01/2018 00:00:00");
String errorMsg = null;
try (Session session = sessionFactory.openSession()) {
session.getTransaction().begin();
ProcedureCall call = session
.createStoredProcedureCall("package_name.procedure_name");
call.registerParameter(1, Long.class, ParameterMode.IN);
call.registerParameter(2, Date.class, ParameterMode.IN);
call.registerParameter(3, Date.class, ParameterMode.IN);
call.registerParameter(4, Table1_Name.class, ParameterMode.OUT);
call.registerParameter(5, Table1_Name.class, ParameterMode.OUT);
call.registerParameter(6, String.class, ParameterMode.OUT);
call.setParameter(1, id);
call.setParameter(2, startDate);
call.setParameter(3, startDate);
System.out.println(call.getOutputs());
}
when I execute this I am getting
PLS-00306: wrong number or types of arguments in call to ‘procedure_name’
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to ‘procedure_name’
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Not sure where am I going wrong
Pleasee helpp !