Hi, I have custom TypeHandlers for accessing user defined data types defined in our oracle database. I have codes like
ArrayDescriptor desc = ArrayDescriptor.createDescriptor("STRARRAY", underLyingConnection); parameter = new ARRAY(desc, underLyingConnection, arr.toArray()); The parameter STRARRAY is defined in another schema, Schema2 and my oracle log in that I use from the application has execute permission on Schema2 and logs in to another schema called Schema1. If I try access the userdefined datatype by specifying as Schema2.STRARRAY or Schema1.STRARRAY or STRARRAY directly Ibatis throws an Caused by: java.sql.SQLException: invalid name pattern: Schema2.STRARRAY The only way out for this problem was to have a synonym defined for the user defined type say "STRARRAYSYNONYMN" in Schema1 and call it from the typehandler like this ArrayDescriptor desc = ArrayDescriptor.createDescriptor("STRARRAYSYNONYMN", underLyingConnection) I am not sure why I can execute the first query from the SqlDeveloper but not execute the same through Ibatis. Any idea on how to solve this problem? When I tried to debug, it seemed like Ibatis was adding "Schema1." prefix to the userdefined type by default. I am not sure why or what was causing this behaviour. Am I doing something wrong? -Sundar