1、异常提示:

  org.apache.ibatis.binding.BindingException: Mapper method 'com.artup.dao.WorksDao.selectWorksIsCropCompletedById attempted to return null from a method with a primitive return type (byte).

2、原因:在使用 MyBatis 时,写了个查询语句,其返回值设置为了 byte 类型,当从数据库中能够查询到数据时,不会报错;当前查询不到数据时则会抛出此异常,是由于 null 不能够直接转换成 byte 类型导致的,我们可以将返回类型设置为对象 Byte,从而能够接收值为 null 的情况。

3、解决办法:

  3.1 将所有查询到的数据的值都设置为数字;

    或者
  3.2 将返回的类型由 byte 改成 Byte 从而能够接收 null 类型的值。

  

org.apache.ibatis.binding.BindingException的更多相关文章

  1. org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):

    org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): da.huying.usermanag ...

  2. Exception:HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    主要错误信息如下: HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...

  3. mybatis使用时org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):的错误

    最近在使用mybatis时,出现了 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 这 ...

  4. IDEA异常解决: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    有时候解决问题不仅仅是解决问题.-----jstarseven 最近因为开发需要,需要搭建一个ssm开发框架,采用了开发工具IDEA. 整合完了SSM开发框架之后,发布的时候出现org.apache. ...

  5. org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'username' not found. Available parameters are [1, 0, param1, param2]

    Spring+mybatis错误:org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.bi ...

  6. 通过maven test 报org.apache.ibatis.binding.BindingException: Invalid bound statement

    背景 直接使用eclipse工具去执行,没有问题,通过testng.xml去执行,没有问题,但通过mvn clean test执行,就报错,提示org.apache.ibatis.binding.Bi ...

  7. ### Cause: org.apache.ibatis.binding.BindingException: Parameter 'name' not found. Available parameters are [arg1, arg0, param1, param2]

    org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: org.apache.ib ...

  8. 怪事年年有,今天特别多!org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.BindingException: Parameter 'empno' not found. Available parameters are [emp, deptno, param1, param

    错误: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.binding.Binding ...

  9. org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): cn.e3mall.search.mapper.ItemMapper.getItemList

    java.lang.RuntimeException: org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...

  10. MyBatis 传List参数 nested exception is org.apache.ibatis.binding.BindingException: Parameter 'idList' not found.

    在MyBatis传入List参数时,MyBatis报错:nested exception is org.apache.ibatis.binding.BindingException: Paramete ...

随机推荐

  1. 手把手教你在CentOS 7.4下搭建Zabbix监控(转)

    Linux系统版本:CentOS 7.4 1.安装前需要先关闭selinux和firewall. 1.1 [root@zabbix ~]# vi /etc/selinux/config 将SELINU ...

  2. React第二篇:组件的生命周期

    前言:因为生命周期是必须要掌握的,所以React的第二篇咱就写这. (版本:16.3.2) React的生命周期大致分为四个状态:分别是Mouting.Updating.Unmounting.Erro ...

  3. 关于如何爬虫妹子图网的源码分析 c#实现

    网上也出现一些抓取妹子图的python 代码,今天我们用c#实现爬虫过程. 请看我的网站: www.di81.com private void www_94xmn_Com(string url, st ...

  4. linux中校验文件完整性(md5,sha1)

    经常在Linux下下载软件的人,一定会有一个良好的习惯:校验文件的hash,以确定文件的完整性甚至是安全性.我配置环境的时候也恰好用到了,笔者的是一个lubuntu的机子.这里我大致做个记录.(不了解 ...

  5. MonoGame2D - MonoGame的2D威力加强版

    简介MonoGame2D 是一款基于MonoGame的扩展工具包,对MonoGame的2D开发方面进行了扩展,主要增加了精灵,字体,地图,组件,GUI等游戏开发中的一些基本元素,以更方便快捷地进行2D ...

  6. fastclick源码分析

    https://www.cnblogs.com/diver-blogs/p/5657323.html  地址 fastclick.js源码解读分析 阅读优秀的js插件和库源码,可以加深我们对web开发 ...

  7. 获取app应用的包名

    1.获取哪个app包名,就打开哪个app 2.在dos窗口下输入: adb shell "dumpsys window | grep mCurrentFocus" 获取包名

  8. Oracle dbms_random随机函数包

    dbms_random是oracle提供的一个随机函数包,以下是它的一些常用的功能: 1.dbms_random.value 作用:生成一个大于等于0,大于等于1的随机的38位小数,代码如下: sel ...

  9. Robot Framework(Screenshot 库)

    Screenshot 库 Scrennshot 同样为 Robot Framework 标准类库,我们只将它提供的其它中一个关键字“TakeScreenshot”,它用于截取到当前窗口.虽然 Scre ...

  10. PageOffice 使用Dome

    一.前言 PageOffice是一款帮助Web应用系统或Web网站实现用户在线编辑Word.Excel.PowerPoint文档,Word/Excel模板动态填充,Word/Excel在线输入提交,系 ...