ssm中报一下错误:

invalid bound statement (not found): me.tspace.pm.dao.userdao.getuser
    at org.apache.ibatis.binding.mappermethod$sqlcommand.<init>(mappermethod.Java:178)
    at org.apache.ibatis.binding.mappermethod.<init>(mappermethod.java:38)
    at org.apache.ibatis.binding.mapperproxy.cachedmappermethod(mapperproxy.java:49)
    at org.apache.ibatis.binding.mapperproxy.invoke(mapperproxy.java:42)
    at $proxy22.getuser(unknown source)

........................

........................

caused by: java.lang.illegalargumentexception: mapped statements collection does not contain value for me.tspace.pm.dao.userdao.getuser

at org.apache.ibatis.session.configuration$strictmap.get(configuration.java:775)
    at org.apache.ibatis.session.configuration.getmappedstatement(configuration.java:615)
    at org.apache.ibatis.session.configuration.getmappedstatement(configuration.java:608)
    at org.apache.ibatis.binding.mappermethod$sqlcommand.<init>(mappermethod.java:176)

... 34 more

三种情况:

1.

<mapper namespace="me.tspace.pm.dao.userdao">

mapper的namespace写的不对!!!注意系修改。

2.

userdao的方法在userdao.xml中没有,然后执行userdao的方法会报此

3. userdao的方法返回值是list<user>,而select元素没有正确配置resultmap,或者只配置resulttype!

4. 如果你确认没有以上问题,请任意修改下对应的xml文件,比如删除一个空行,保存.问题解决...

转载自http://blog.csdn.net/two_people/article/details/51984516

mybatis一个怪异的问题: Invalid bound statement not found的更多相关文章

  1. oracle+mybatis报错:BindingException("Invalid bound statement (not found): ")

    oracle+mybatis报错:BindingException("Invalid bound statement (not found): ") 从mysql转到oracle数 ...

  2. 在使用mybatis的selectFromExample时出现Invalid bound statement (not found)错误

    主要原因:运行项目在构建的时候只会默认的去加载resource资源文件里面的资源,其他地方的配置资源不会加载 .故没有读取到mybatis的MapperXml映射 结构如下 ============= ...

  3. myBatis的binding错误:Invalid bound statement (not found)

    org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误这个问题我找了好久,终于找到了正确的写 ...

  4. MyBatis使用动态代理报 invalid bound statement (not found) 错

    这个问题网上大部分都说xml文件中的路径不对 或者是resources之类的问题,如果那些文章的解决方案解决不了你的问题的话,可以看一下我遇到的这种情况: 前提: mybatis-config.xml ...

  5. springboot+mybatis报错Invalid bound statement (not found)

    今天做项目时报了一个错提示说Invalid bound statement (not found),也就是说mapper接口绑定.xml文件出错了,找不到指定的sql:原因是程序没有把.xml文件编译 ...

  6. mybatis:Invalid bound statement (not found)

    [常规解决办法] 如果出现: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 一般的原因 ...

  7. MyBatis绑定错误--BindingException:Invalid bound statement (not found)

    如果出现: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 一般的原因是Mapper i ...

  8. MyBatis笔记----报错Exception in thread "main" org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.ij34.model.UserMapper.selectUser

    信息: Refreshing org.springframework.context.support.ClassPathXmlApplicationContext@41cf53f9: startup ...

  9. mybatis错误之org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)

    玩了MyBatis差不多有两年了,中间也玩过MyBatis-Plus,这个MyBatis-Plus其实与MyBatis的区别并不大.今天写博客业务代码的时候,犯一个初学者犯过的错误. 错误信息如下:o ...

随机推荐

  1. TortoiseSVN与VisualSVN Server搭建SVN版本控制系统

    本片主要介绍如何搭建SVN版本控制系统,主要使用工具: 1 客户端:TortoiseSVN (小乌龟) 2 服务端:VisualSVN Server 搭建出图形化管理,以及右键菜单版本控制管理的SVN ...

  2. Ignite安装配置——中篇

    Linux Ignite配置——上篇大体介绍了一下Ignite工具的功能.特性等,以及如何在Linux 上安装配置.从上篇可见Ignite安装非常的简单方便.下面介绍一下Ignite Reposito ...

  3. String与int之间的转换

    原文: http://www.360doc.com/content/10/1215/00/2258566_78225883.shtml

  4. mysql中类似indexOf的方法LOCATE()

     LOCATE(substr,str), LOCATE(substr,str,pos) 第一个语法返回substr在字符串str 的第一个出现的位置. 第二个语法返回子符串 substr 在字符串st ...

  5. 【hive】——Hive基本操作

    阅读本文章可以带着下面问题:1.与传统数据库对比,找出他们的区别2.熟练写出增删改查(面试必备) 创建表:hive> CREATE TABLE pokes (foo INT, bar STRIN ...

  6. 为什么 MySQL 回滚事务也会导致 ibd 文件增大?

    一个简单的测试: start transaction; insert into tb1 values(3, repeat('a', 65000),'x',1); --commit; rollback; ...

  7. Neutron 理解 (4): Neutron OVS OpenFlow 流表 和 L2 Population [Netruon OVS OpenFlow tables + L2 Population]

    学习 Neutron 系列文章: (1)Neutron 所实现的虚拟化网络 (2)Neutron OpenvSwitch + VLAN 虚拟网络 (3)Neutron OpenvSwitch + GR ...

  8. Facebook不相信所谓的员工能力等级。《长效商业英雄》(《哈佛商业评论》2016年11期),4星。

    老牌管理杂志.本期我给4星.以下是书中一些信息的摘抄: 1:爱因斯坦曾说:“任何傻瓜都能让事情更复杂,只有天才能让事情变简单.”单就这一点来看,乔布斯无疑是天才中的天才.#137 2:通过让苹果聚焦于 ...

  9. 一道算法题目, 二行代码, Binary Tree

    June 8, 2015 我最喜欢的一道算法题目, 二行代码. 编程序需要很强的逻辑思维, 多问几个为什么, 可不可以简化.想一想, 二行代码, 五分钟就可以搞定; 2015年网上大家热议的 Home ...

  10. asp.net页面关闭的时候如何触发事件?

      <script type="text/javascript"> var pb_strConfirmCloseMessage; var pb_blnCloseWind ...