ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rao, Satish" <satish....@fmr.com>
Subject ArrayDescriptor issue
Date Mon, 15 Aug 2005 21:32:42 GMT
I have created the following TYPE in oracle

Create or replace type ord_array as table of number;

I am passing in an ArrayList of orderIds to a stored procedure as IN.

I am using the following sqlMap entry
<parameter property="orderId" mode="IN" jdbcType="ARRAY"

I have a custom typehandler to retrive the ArrayList and create a
oracle.sql.ARRAY (I am not sure if this is correct approach).

Here's the custom typehandler code

public void setParameter(ParameterSetter arg0, Object arg1)
	//arg1 is a ArrayList and I have created a orderIdArr from this
	Connection conn = arg0.getPreparedStatement().getConnection();

	ArrayDescriptor descriptor =
ArrayDescriptor.createDescriptor("ord_array", conn);
	ARRAY array = new ARRAY (descriptor, conn, orderIdArr);

I get the following error when the code at ArrayDescriptor is executed.
The error occurred while applying a parameter map.  
--- Check the test-detail-proc-param.  
--- Check the parameter mapping for the 'orderId' property.  
--- Cause: java.sql.SQLException: ORA-04043: object
"FPDBCOL1"."ord_array" does not exist

I am not sure why this is happening. I tried prefixing ord_array with
the schema name, that did not work either.

Has anyone solved a similar issue?

View raw message