今天在重做 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. ubunt14.04搭建lNMP

    一.安装mysql 1.  sudo apt-get update 2.  sudo apt-get install apt-get nginx 二.安装mysql 1.  sudo apt-get ...

  2. 07_ddms透视图介绍

    通过ADB(Android Debug Bridge)安卓调试桥把你的Eclipse(集成开发环境)和你的设备连接在一起.有时候ADB可能会被其他的东西占用.例如WPS会跟你抢ADB(抢端口).如果你 ...

  3. Hive 进阶

    两种情况下不走map-reduce: 1. where ds >' ' //ds 是partition 2. select * from table //后面没有查询条件,什么都没有 1.建表 ...

  4. WHAT is CPU负载?

    WHAT?? 1.CPU负载都有哪些? cpu负载的定义:在一般情况下可以将单核心cpu的负载看成是一条单行的桥,数字1代表cpu刚好能够处理过来,即桥上能够顺利通过所有的车辆,桥外没有等待的车辆,桥 ...

  5. Ensembl突变数据描述之(一)——突变物种数据库及预测工具

    以下是对Ensembl突变数据库中储存的数据的描述,对于Ensembl数据库中不同的物种,我们从各种来源(例如,dbSNP数据库)导入突变数据(SNP.CNV.等位基因频率.基因型等),导入的突变数据 ...

  6. Luogu 2900 [USACO08MAR]土地征用Land Acquisition

    斜率优化dp. 首先发现如果存在$x$和$y$使得$len(x) \geq len(y)$并且$wid(x) \geq wid(y)$,那么$y$直接不考虑就好了,因为在买$x$的时候就把$y$顺便带 ...

  7. 【机器学习】EM最大期望算法

    EM, ExpectationMaximization Algorithm, 期望最大化算法.一种迭代算法,用于含有隐变量(hidden variable)的概率参数模型的最大似然估计或极大后验概率估 ...

  8. storm shell命令源码分析-shell_submission.clj

    当我们在shell里执行storm shell命令时会调用shell_submission.clj里的main函数.shell_submission.clj如下: shell_submission.c ...

  9. 第四周作业-视频学习、教材作业wireshark

    教材总结与作业 总结 网络嗅探技术定义:网络嗅探(sniff)是一种黑客常用的窃听技术,(1)利用计算机的网络接口截获目的地为其他计算机的数据报文,(2)监听数据流中所包含的用户账户密码或私密通信等. ...

  10. redis系列:通过共同好友案例学习set命令

    前言 这一篇文章将讲述Redis中的set类型命令,同样也是通过demo来讲述,其他部分这里就不在赘述了. 项目Github地址:https://github.com/rainbowda/learnW ...