I have created a RunnableJar (a jar containing other third party jars like iText.jar, java classes, etc...) and I have upload that RunnableJar.jar in Oracle database using loadjava
. In the jar i have main class GetOffer
in that i have one public String getOffer(String param1) { }
method and the use of this method is to create multiple pdf according to user selection and concat them.
Now I have created Stored procedure:
create or replace function getOffer(param1 in varchar2) return varchar2
is language java name 'GetOffer.getOffer(java.lang.String) return java.lang.String';
And I have called this stored procedure using following call statement:
SQL> VARIABLE myString VARCHAR2(20);
SQL> CALL getOffer("XYZ") INTO :myString
When calling the procedure I am getting the below error:
SQL> VARIABLE myString VARCHAR2(20);
SQL> CALL getOffer("XYZ") INTO :myString
2 ;
CALL getOffer("Any String") INTO :myString
*
ERROR at line 1:
ORA-06576: not a valid function or procedure name
How can I solve this problem?