It might be a direct question but I'm trying many options which is not working. I've given the below details for your reference. Mybatis xml configuration:-
<select id="updateComps" statementType="CALLABLE" parameterType="java.util.List">
<![CDATA[ {call vivo.select_workout (#{list, mode=IN, jdbcType=ARRAY})}]]>
</select>
Postgres Function:-
CREATE OR REPLACE FUNCTION vivo.delete_completed_activity_logged_workout(INT[])
RETURNS integer
LANGUAGE plpgsql
AS $function$
declare
ids ALIAS FOR $1;
dist BIGINT[];
Mapper config:-
void deleteCompletedActivityRecords(List<Integer> users);
Error facing:-
aused by: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType ARRAY . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.lang.ClassCastException: java.util.Arrays$ArrayList cannot be cast to java.sql.Array at org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:55) at org.apache.ibatis.scripting.defaults.DefaultParameterHandler.setParameters(DefaultParameterHandler.java:87) ... 68 more Caused by: java.lang.ClassCastException: java.util.Arrays$ArrayList cannot be cast to java.sql.Array at org.apache.ibatis.type.ArrayTypeHandler.setNonNullParameter(ArrayTypeHandler.java:35) at org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:53) ... 69 more [WARNING] Could not send response error 500: javax.servlet.ServletException: javax.servlet.ServletException: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: Could not set parameters for mapping: ParameterMapping{property='list', mode=IN, javaType=class java.lang.Object, jdbcType=ARRAY, numericScale=null, resultMapId='null', jdbcTypeName='null', expression='null'}. Cause: org.apache.ibatis.type.TypeException: Error setting non null for parameter #1 with JdbcType ARRAY . Try setting a different JdbcType for this parameter or a different configuration property. Cause: java.lang.ClassCastException: java.util.Arrays$ArrayList cannot be cast to java.sql.Array
"integer"should be the first argument ofcreateArrayOfinstead of"text". - ave