Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property ‘__
程序员文章站
2022-03-01 13:36:50
...
异常信息:
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property '__frch_id_0'. It was either not specified and/or could not be found for the javaType (com.cy.pj.sys.entity.SysMenu) : jdbcType (null) combination.
### The error may exist in file [D:\Users\DREGON\MyProject\DB-SYS-V3.01\target\classes\mappers\SysMenuRoleMapper.xml]
### The error may involve com.cy.pj.sys.dao.SysMenuRoleDao.deleteObjectsByMenuId
### The error occurred while executing an update
### Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property '__frch_id_0'. It was either not specified and/or could not be found for the javaType (com.cy.pj.sys.entity.SysMenu) : jdbcType (null) combination.
产生问题的原因:
<delete id="deleteObjectsById" parameterType="com.cy.pj.sys.entity.SysMenu">
delete from sys_menus
where id in
<foreach collection="menus"
item="menu"
open="("
close=")"
separator=",">
#{menu} /*这里的item是对象不是属性 应该为 #{menu.id} */
</foreach>
</delete>
推荐阅读
-
解决:java.lang.IllegalStateException: Type handler was null on parameter……
-
Type handler was null on parameter mapping for property '__frch_id_0'
-
Type handler was null on parameter mapping for property '__frch_item_0'. It was either not specified
-
MyBatis报错Type handler was null on parameter mapping for property XX
-
关于 mybatis 中Type handler was null on parameter mapping for property '__frch_id_0'类似的错误
-
mybatis报错:Type handler was null on parameter mapping or property ‘__frch_xxx_0’
-
mybatis传入多个参数Lis(Map(String,Object))type handler was null on parameter mapping for property
-
Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property ‘__