报错信息:

Caused by: org.apache.ibatis.type.TypeException: Error setting non null for parameter #2 with JdbcType null . Try setting a different JdbcType for this parameter or a different configuration property. Cause: dm.jdbc.driver.DMException: 序列号无效

场景:

使用mybatis 里的collection标签进行一对多查询, 在子查询中进行模糊搜索.

看到报错信息, 以为是返回的子数据多的原因造成的.子数据和主数据序列号不匹配问题呢!!

后发现... mybatis <if>标签里 有注释未删除..会造成序列号无效...

大写的无语.

切记:

检查xml, SQl标签内 是否有注释 !!!!

————————————————

原文链接:https://blog.csdn.net/JAVA_LT1224/article/details/132362979