3
votes

Trying to call SQL procedure:

PROCEDURE Incident_inqr
(MSISDN IN VARCHAR2
, Topic IN varchar2
,Incident_id IN varchar2 default '20120401' 
, RESULT OUT number
);

java JDBC string:

SQL command: begin ? := SMASTER.SERVICE.Incident_inqr ( '9308000050','6345_NN','20120401', ?); end;

the error (I'm getting it in Russian):

SQL exception - code: 6550 ORA-06550: Строка 1, столбец 13: PLS-00222: функция с именем 'INCIDENT_INQR' не существует в этой области действия ORA-06550: Строка 1, столбец 7: PL/SQL: Statement ignored

translated:

SQL exception - code: 6550 ORA-06550: line 1, column 13: PLS-00222: function called 'INCIDENT_INQR' does not exist in this action area ORA-06550: line 1, column 7: PL / SQL: Statement ignored

output ? registration:

cs.registerOutParameter(1, oracle.jdbc.driver.OracleTypes.VARCHAR);
cs.registerOutParameter(2, oracle.jdbc.driver.OracleTypes.NUMBER);
2

2 Answers

3
votes

Incident_inqr is a procedure. So it has no return value but just the out parameter.

The proper way to call it thus is:

begin SMASTER.SERVICE.Incident_inqr ( '9308000050','6345_NN','20120401', ?); end;

...

cs.registerOutParameter(1, oracle.jdbc.driver.OracleTypes.NUMBER);

Furthermore, the procedure needs to be part of a package called 'SERVICE' in the schema / belonging to the user SMASTER.

0
votes

Be sure to check that in your metadata/code you call with the procedure with the following name format: SCHEMA_USERNAME.PACKAGE_NAME.PROCEDURE_NAME