org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException:

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.type.TypeException: JDBC requires that the JdbcType must be specified for all nullable parameters.
    at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:76)
    at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:399)
    at com.sun.proxy.$Proxy57.selectList(Unknown Source)
    at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:205)
    at org.apache.ibatis.binding.MapperMethod.executeForMany(MapperMethod.java:119)
    at org.apache.ibatis.binding.MapperMethod.execute(MapperMethod.java:63)
    at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:52)
    at com.sun.proxy.$Proxy69.findList(Unknown Source)
    at com.thinkgem.jeesite.common.service.BusinessService.findPage(BusinessService.java:60)

Caused by: org.apache.ibatis.type.TypeException: JDBC requires that the JdbcType must be specified for all nullable parameters.
    at org.apache.ibatis.type.BaseTypeHandler.setParameter(BaseTypeHandler.java:40)
    at com.thinkgem.jeesite.common.persistence.interceptor.SQLHelper.setParameters(SQLHelper.java:84)
    at com.thinkgem.jeesite.common.persistence.interceptor.SQLHelper.getCount(SQLHelper.java:132)
    at com.thinkgem.jeesite.common.persistence.interceptor.PaginationInterceptor.intercept(PaginationInterceptor.java:64)
    at org.apache.ibatis.plugin.Plugin.invoke(Plugin.java:60)
    at com.sun.proxy.$Proxy252.query(Unknown Source)
 

原因:查询时 把外键id传入了null或者“”的字段。

猜你喜欢

转载自blog.csdn.net/ASZJBGD/article/details/84382202
今日推荐