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

另一种解决办法是:
在这里插入图片描述
但是还有另一种解决办法,是网上查到的,说po类 缺空参构造。但是实际上我有空参构造,并不能解决问题,
更改了数据库的结构,可以逐一排查。

还有一种是get/set 方法,去看看po类是不是有缺少这两种方法的参数

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值