当前使用版本(必填,否则不予处理)
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.3.1</version>
</dependency>
该问题是如何引起的?(确定最新版也有问题再提!!!)
早期版本试过是可以的,但是忘记用的是哪个版本了。
重现步骤(如果有就写完整)
抽离id、createTime、updateTime作为父类属性,实体类去继承父类就会触发异常。 不继承属性写在实体类中,不存在异常。
报错信息
Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property '_handledType'. It was either not specified and/or could not be found for the javaType (java.lang.Class) : jdbcType (null) combination.
Comment From: xiaoizichao
Caused by: org.apache.ibatis.exceptions.PersistenceException:
Error updating database. Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property '_handledType'. It was either not specified and/or could not be found for the javaType (java.lang.Class) : jdbcType (null) combination.
The error may exist in com/qzkj/full/house/dal/dao/UserMapper.java (best guess)
The error may involve com.qzkj.full.house.dal.dao.UserMapper.insert
The error occurred while executing an update
Cause: java.lang.IllegalStateException: Type handler was null on parameter mapping for property '_handledType'. It was either not specified and/or could not be found for the javaType (java.lang.Class) : jdbcType (null) combination.
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:196)
at org.apache.ibatis.session.defaults.DefaultSqlSession.insert(DefaultSqlSession.java:181)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:578)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:427)
... 81 more
Caused by: java.lang.IllegalStateException: Type handler was null on parameter mapping for property '_handledType'. It was either not specified and/or could not be found for the javaType (java.lang.Class) : jdbcType (null) combination.
at org.apache.ibatis.mapping.ParameterMapping$Builder.validate(ParameterMapping.java:119)
at org.apache.ibatis.mapping.ParameterMapping$Builder.build(ParameterMapping.java:104)
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.buildParameterMapping(SqlSourceBuilder.java:143)
at org.apache.ibatis.builder.SqlSourceBuilder$ParameterMappingTokenHandler.handleToken(SqlSourceBuilder.java:87)
at org.apache.ibatis.parsing.GenericTokenParser.parse(GenericTokenParser.java:77)
at org.apache.ibatis.builder.SqlSourceBuilder.parse(SqlSourceBuilder.java:50)
at org.apache.ibatis.scripting.xmltags.DynamicSqlSource.getBoundSql(DynamicSqlSource.java:42)
at org.apache.ibatis.mapping.MappedStatement.getBoundSql(MappedStatement.java:305)
at org.apache.ibatis.executor.statement.BaseStatementHandler.
Comment From: nieqiurong
提供一下复现工程.
Comment From: xiaoizichao
Comment From: xiaoizichao
User类只要继承EntryPo就会报错 。现在测试用例里头是正常可以插入的,你试试
Comment From: nieqiurong
User类只要继承EntryPo就会报错 。现在测试用例里头是正常可以插入的,你试试
我下载排查看看
Comment From: nieqiurong
看着_handledType是你继承SerializableSerializer过来的属性字段.
Comment From: houkunlin
我的父类是完全没问题的
估计是 com.fasterxml.jackson.databind.ser.std.SerializableSerializer 引起的问题
Comment From: xiaoizichao
嗯嗯 ,我看错了 不好意思 。