Spring: PLS-00306: wrong number or types of arguments in call to 'SP_GET_IDENTIFIERS'

Viewed 24

I am trying to run a stored procedure and keep getting the error PLS-00306: wrong number or types of arguments in call to 'SP_GET_IDENTIFIERS'

Here is the creation of package, package body and procedure:

CREATE OR REPLACE PACKAGE CCL.P_GET_HOLDERS
as

procedure SP_GET_IDENTIFIERS(out_identifiers out sys_refcursor);

end p_get_holders;
/


CREATE OR REPLACE PACKAGE BODY CCL.P_GET_HOLDERS
is


procedure SP_GET_IDENTIFIERS(
out_identifiers out sys_refcursor
)
is
begin
open out_identifiers for
select "START"
     , "END"
     , DIGITS
     , "FUNCTION"
from CCL.tb_identifier;

end SP_GET_IDENTIFIERS;

end p_get_holders;
/

Here is my repository and the call to the procedure:

@Repository
public interface IdentifierRepository extends JpaRepository<Identifier,Long> {

   @Procedure(procedureName = "CCL.P_GET_HOLDERS.SP_GET_IDENTIFIERS")
   List<Identifier> findAllIdentifiers();

This is what is in my identifier class:

@Getter
@Setter
@Builder
@NoArgsConstructor
@AllArgsConstructor(access = AccessLevel.PROTECTED)
@ToString
@EqualsAndHashCode
@Entity
@Table(name = "TB_IDENTIFIER")

    public class Identifier {

    @Id
    @Column(name = "START", length = 18)
    private String start;
    @Column(name = "END", length = 18)
    private String end;
    @Column(name = "DIGITS",length = 10)
    private String digits;
    @Column(name = “FUNCTION", length=30)
    private MainFunction function;

So, when trying to call findAllIdentifiers(), I get that error. Can anyone spot what I am doing wrong? Or provide me an alternative solution?

0 Answers
Related