Mybatis call oracle stored proc pass array as IN param

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Mybatis call oracle stored proc pass array as IN param

gaintsnj
This post has NOT been accepted by the mailing list yet.
Hello I am new to MyBatis and was trying to invoke oracle store proc with NTBL_VARRAY as IN parameter.

PROCEDURE SP_LOAD_DATA(
   p_IMG_REP            IN     varchar_arr,
   p_IMG_RP_CONT          IN     NTBL_VARRAY
  );


<insert id="callSaveDataSP" statementType="CALLABLE" parameterType="SaveImageRepositoryVO">
    	{ CALL SP_LOAD_DATA(
    		#{imgRepMaster, mode=IN, typeHandler=com.quest.imgrepository.handler.ArrayVarCharTypeHandler},
    		#{imgRepContents, mode=IN, typeHandler=com.quest.imgrepository.handler.NTBLArrayTypeHandler}
    	)}
</insert>

I have two TypeHandler's one for each VARCHAR_ARR and NTBL_VARRAY. However I am getting following exception. Any help is highly appreciated.
org.springframework.jdbc.UncategorizedSQLException: 
### Error updating database.  Cause: java.sql.SQLException: 
Fail to convert to internal representation: [
[car2519, 1, particles measured , [B@2e4b40d, jpeg, Mlity, image, Y, 200, 350, 
L5044Mon Nov 25 00:00:00 EST 1991Tue May 31 00:00:00 EDT 2011, null], 
[car0535, 1, particle derived from MASS, [B@2e4b8df, jpeg, mobility, image, 
Y, 218, 298, 5044Mon Nov 25 00:00:00 EST 1991Tue May 31 00:00:00 EDT 2011, null]
]
Loading...