今天在重做 iblog 客户端时,测试接口情况,发现了

org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)::iblog.server_java.dao.AuthorDao.selectForLogin

的报错。经过排查,基本定位为 AuthorMapper.xml 文件中的问题。但是检查 namespace 属性的Dao路径又没发现什么问题。

上网搜索了一阵,答案全部都是让检查路径或者文件名有没有错,可是都没发现问题。

后来回想写 Mapper 文件时,时复制粘贴 iReview 项目的,对比了它们的路径,也没发现问题,难道就无解了?

<mapper namespace="main.java.iReview.dao.UsersDao">
<mapper namespace="main.java.iblog.server_java.dao.AuthorDao">

后来,经过仔细对比,前后两个项目的不同之处在于项目路径,iReview 是在 main.java.main.java 下,而 iblog 是在 main.java 之下。

猜测 Mapper 文件 namespace 属性的路径是不用带默认的 main.java ,于是把它删了,再测试,果然没问题了。

<mapper namespace="iblog.server_java.dao.AuthorDao">

又涨知识了^_^

【踩坑】遇到 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 报错的更多相关文章

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

    0 环境 系统环境:win10 1 正文 先检查Mapper接口与相关联xml文件是否对应,需要检查包名,namespace位置是否写对,curd时id名称等能否对应上 常规步骤: :检查mapper ...

  2. IDEA+Maven+Mybatis 巨坑:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.rao.mapper.UserMapper.findAll

    org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.rao.mapper.User ...

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

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

  4. 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 ...

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

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

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

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

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

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

  8. 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 ...

  9. Java学习-052-(mybatis+mysql)访问接口时提示:org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    在配置mybatis,访问接口提示: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found),部 ...

随机推荐

  1. .net 缓存之文件缓存依赖

    CaCheHelp 类中代码如下: #region 根据键从缓存中读取保持的数据 /// <summary> /// 根据键从缓存中读取保持的数据 /// </summary> ...

  2. [xdoj1029]求解某个数的最高位和最低位

    解题关键: 1.最高位求法 long long int x=n^m; 式子两边同时取lg lg(x)=m*lg(n): x=10^(m*lg(n)): 10的整数次方的最高位一定是1,所以x的最高位取 ...

  3. zookeeper相关知识的总结:

    一.分布式协调技术 在给大家介绍ZooKeeper之前先来给大家介绍一种技术——分布式协调技术.那么什么是分布式协调技术?那么我来告诉大家,其实分布式协调技术 主要用来解决分布式环境当中多个进程之间的 ...

  4. 实现hadoop中的机架感知

    hadoop中声明是有机架感知的功能,能够提高hadoop的性能.平时我们使用的hadoop集群,实际上是从来没有使用上这个功能的. hadoop中所说的 机架感知的实现实际上这样的: hadoop启 ...

  5. sort命令实战

    本文参考:http://www.cnblogs.com/dong008259/archive/2011/12/08/2281214.html 东方雨中漫步者 sort命令,帮助我们依据不同的数据类型进 ...

  6. 阶段2-新手上路\项目-移动物体监控系统\Sprint4-嵌入式web服务器开发\第3课-CGI程序开发

    实现CGI程序显示一幅图片最核心的功能 把上一节课编写好的led.c程序拷贝过来,并重新命名为image.c 把led的某些部分删除,后如下 那么如何显示一幅图片呢,百度(搜索在html里面去插入图片 ...

  7. C# 生成chm帮助文件

    引用博友的博客地址,里面有详细资料,谢谢博主分享 http://blog.csdn.net/snakorse/article/details/44963015

  8. Dreamweaver Flash Photoshop网页设计综合应用 (智云科技) [iso] 1.86G

    全书共15章,主要包括网页制作基础.Dreamweaver CC网页制作.Photoshop CC网页图像设计.Flash CC网页动画设计以及综合案例实战5个部分.通过本书的学习,不仅能让读者学会三 ...

  9. 从零开始安装 Ambari (2) -- 准备本地 repository

    安装 Ambari,最后是为了用它部署 hadoop 集群.安装时默认使用的是 hortonworks 远程的资源,用它部署集群时,需要下载 Hadoop.Hive.HBase 的安装包,速度很慢.我 ...

  10. 水库(树形dp)

    水库 (树形dp) R国有n座城市和n-1条长度为1的双向道路,每条双向道路连接两座城市,城市之间均相互连通.现在你需要维护R国的供水系统.你可以在一些城市修建水库,在第i个城市修建水库需要每年c_i ...