You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by "Rao, Satish" <sa...@fmr.com> on 2005/08/15 23:32:42 UTC

ArrayDescriptor issue

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"
javaType="java.util.ArrayList"/>

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
list
	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?


Re: ArrayDescriptor issue

Posted by Koka <22...@gmail.com>.
Can you test whether your code works using just JDBC (without iBatis)?
I think that way we'd know direction where to look

Koka