今天在重做 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. centos6 搭建IPSEC

    http://www.maxwhale.com/how-to-install-l2tp-vpn-on-centos/ http://blog.earth-works.com/2013/02/22/ho ...

  2. R: vector 向量的创建、操作等。

    ################################################### 问题:创建.操作向量   18.4.27 怎么创建向量 vector,,及其相关操作 ??? 解 ...

  3. c/c++转义字符大全【转自互联网】

    将转义字符收集如下:转义字符 意义 ASCII码值(十进制) \a 响铃(BEL) 007 \b 退格(BS) 008 \f 换页(FF) 012 \n 换行(LF) 010 \r 回车(CR) 01 ...

  4. C#中索引器Indexer的学习使用

    索引器 顾名思义,是用来索引的,那么C#中索引器是用来索引什么的呢 首先我们知道,C#中的数组是本身就可以索引的,那么C#中的类和结构呢,类和结构的实例是无法索引的,如果我们想让C#中类或者结构的实例 ...

  5. eigen3.3.3+opencv3.2跑orbslam3数据集出现usleep错误

    cd ORB_SLAM2 chmod +x build.sh ./build.sh的时候出现错误:/home/zhao/ORB_SLAM2-master/src/System.cc:236:28: e ...

  6. AutoCAD 2014 在Server 2008 中 十字光标很慢

    另外,请在你们的Windows Server上增加如下注册表: On      both Windows Server 2008 R2 and Windows Server 2012 create E ...

  7. 计算像素亮度(Pixel Light)

    RGB有亮度吗?常用公式: Y(亮度)=(0.299*R)+(0.587*G)+(0.114*B)

  8. Unable to round-trip http request to upstream: EOF问题

    Unable to round-trip http request to upstream: EOF, 今天我用的phpstudy环境中的网站页面忽然打不开了,报错“Unable to round-t ...

  9. struts2学习笔记——第一个struts2应用配置

    说实在的,随着Java学习的不断深入,特别是Java web框架部分,调bug让人很心累,但是每征服一个bug,内心的成就感也是难以言说的.第一个struts2应用的配置,我昨天折腾了快2个小时,最后 ...

  10. 洛谷P3792 由乃与大母神原型和偶像崇拜

    P3792 由乃与大母神原型和偶像崇拜 题目背景 由乃最近没事干,去研究轻拍学去了 就是一个叫做flip flappers,轻拍翻转小膜女的番 然后研究的过程中她看到了一个叫做大母神原型的东西 大母神 ...