java - passing-Arrays in oracle gespeicherten Prozedur

Ich habe eine Java-Anwendung auf eine oracle-gespeicherten Prozedur. Die Argumente, die an die gespeicherte Prozedur enthalten ein array-Typ. Ich mache es wie folgt...

con = this._getConnection();  
Connection narrowdConn = (Connection)WSJdbcUtil.getNativeConnection( (WSJdbcConnection)con );  

callable = con.prepareCall("{call MY_PKG.MY_PROCEDURE(?, ?)}");  


ArrayDescriptor arrayDescriptor = ArrayDescriptor.createDescriptor("VARCHAR2_ARR", narrowdConn);  
ARRAY arrayArg1 = new ARRAY(arrayDescriptor, con, docNames);  
ARRAY arrayArg2 = new ARRAY(arrayDescriptor, con, docTypes);  

callable.setArray(1, arrayArg1);  
callable.setArray(2, arrayArg2);  

callable.execute();  

Nun, ich bekomme die Ausnahme...

java.sql.SQLException: invalid name pattern: MY_PKG.VARCHAR2_ARR

VARCHAR2_ARR ist eine öffentliche ART, definiert innerhalb eines Oracle-Pakets wie folgt:

TYP VARCHAR2_ARR IST TABELLE VARCHAR2(50);

Und als solche in mein gespeicherter...

PROCEDURE MY_PROCEDURE  
    (V_ARR_ARG1  IN VARCHAR2_ARR,  
     V_ARR_ARG2  IN VARCHAR2_ARR)  

InformationsquelleAutor coder | 2009-09-09

Schreibe einen Kommentar