mysql数据库UNCATEGORIZED SQLEXCEPTION FOR SQL []; SQL STATE [NULL]; ERROR CODE [0]

— The error occurred in com/jxc/dao/impl/maps/T_report.xml.
— The error occurred while applying a result map.
— Check the T_report.selectT_reportAll-AutoResultMap.
— The error happened while setting a property on the result object.
— Cause: net.sf.cglib.beans.BulkBeanException; nested exception is com.ibatis.common.jdbc.exception.NestedSQLException:
— The error occurred in com/jxc/dao/impl/maps/T_report.xml.
— The error occurred while applying a result map.
— Check the T_report.selectT_reportAll-AutoResultMap.
— The error happened while setting a property on the result object.
— Cause: net.sf.cglib.beans.BulkBeanException

  1. 在自动注入属性值的时候,发生异常;
  2. 返回的是null,但接收的属性不能接收空值,可以接收的是0;
  3. 判断出来bean属性里面应该是个基本类型,需要修改为包装类型
  4. int --> Integer

另一种解决办法是:

<result property="updator" column="updator"/>  

修改成

上一篇:mongo change stream


下一篇:解决安装postgresql安装报An error occurred executing the Microsoft C++ runtime installer.问题