| Author |
Passing Array to Stored Procedure
|
Gilbert johnson
Ranch Hand
Joined: Jul 10, 2005
Posts: 45
|
|
Hi I read the solution that AVI provided in the following topic: http://www.coderanch.com/t/302345/JDBC/java/Passing-array-input-procedure-thin But my error i still there. I will try to provide you all the information. If you could help me, I would really appreciate it. Oracle database version you are using Oracle 9i Java version you are using JDK1.5 JDBC driver ORacle JDBC DRIVER ********************************************************* entire error message and stack trace you are getting java.lang.ClassCastException: org.apache.commons.dbcp.PoolableConnection at oracle.sql.ArrayDescriptor.createDescriptor(ArrayDescriptor.java:87) at com.message.dao.MessageCenter.insertNewMessage(MessageCenter.java:514) at com.message.action.PopulateAction.execute(PopulateAction.java:202) *********************************************************** the part of your java code that is causing the error String[] str = {"MAST","MAST"}; //LINE 514 ArrayDescriptor desc = ArrayDescriptor.createDescriptor("PCKOMSMM100.CUST_NMBR_TABLE", con); ARRAY newArray = new ARRAY(desc, con, str); stmt.setArray(2,newArray); ********************************************************* the call-spec for your PL/SQL procedure It is part of a package PCKOMSMM100 Type CUST_NMBR_TABLE is table of VARCHAR2(30) ; FUNCTION insertMessage ( CUST_IDS_LIST IN CUST_NMBR_TABLE ) ******************************************************* Thanks Gublooo
|
 |
 |
|
|
subject: Passing Array to Stored Procedure
|
|
|