mybatis一个怪异的问题: Invalid bound statement not found
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的更多相关文章
- oracle+mybatis报错:BindingException("Invalid bound statement (not found): ")
oracle+mybatis报错:BindingException("Invalid bound statement (not found): ") 从mysql转到oracle数 ...
- 在使用mybatis的selectFromExample时出现Invalid bound statement (not found)错误
主要原因:运行项目在构建的时候只会默认的去加载resource资源文件里面的资源,其他地方的配置资源不会加载 .故没有读取到mybatis的MapperXml映射 结构如下 ============= ...
- myBatis的binding错误:Invalid bound statement (not found)
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)错误这个问题我找了好久,终于找到了正确的写 ...
- MyBatis使用动态代理报 invalid bound statement (not found) 错
这个问题网上大部分都说xml文件中的路径不对 或者是resources之类的问题,如果那些文章的解决方案解决不了你的问题的话,可以看一下我遇到的这种情况: 前提: mybatis-config.xml ...
- springboot+mybatis报错Invalid bound statement (not found)
今天做项目时报了一个错提示说Invalid bound statement (not found),也就是说mapper接口绑定.xml文件出错了,找不到指定的sql:原因是程序没有把.xml文件编译 ...
- mybatis:Invalid bound statement (not found)
[常规解决办法] 如果出现: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 一般的原因 ...
- MyBatis绑定错误--BindingException:Invalid bound statement (not found)
如果出现: org.apache.ibatis.binding.BindingException: Invalid bound statement (not found) 一般的原因是Mapper i ...
- 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 ...
- mybatis错误之org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
玩了MyBatis差不多有两年了,中间也玩过MyBatis-Plus,这个MyBatis-Plus其实与MyBatis的区别并不大.今天写博客业务代码的时候,犯一个初学者犯过的错误. 错误信息如下:o ...
随机推荐
- 创建版本库-GIT
什么是版本库呢?版本库又名仓库,英文名repository,你可以简单理解成一个目录,这个目录里面的所有文件都可以被Git管理起来,每个文件的修改.删除,Git都能跟踪,以便任何时刻都可以追踪历史,或 ...
- ORA-01012: not logged on
关于ORA-01012这个错误,惜分飞的博客ORA-01012: not logged on里面已经做了一些介绍,原因就不多说了,看看他的描述说明: 现象说明: 1)终于发现了ORA-01012错误, ...
- 【hive】——Hive初始了解
1.没有接触,不知道这个事物是什么,所以不会产生任何问题.2.接触了,但是不知道他是什么,反正我每天都在用.3.有一定的了解,不够透彻.那么hive,1.我们对它了解多少?2.它到底是什么?3.hiv ...
- git 设置代理服务器
git可以通过以下命令设置代理服务器 git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:proxypo ...
- 机器学习库shark安装
经过两天的折腾,一个对c++和机器学习库的安装都一知半解的人终于在反复安装中,成功的将shark库安装好了,小小纪念一下,多亏了卡门的热心帮忙. shark的安装主要分为以下几个部分: (1)下载 s ...
- 第一次打开Lightroom时的基本设置
[声明] 欢迎转载,但请保留文章原始出处→_→ 生命壹号:http://www.cnblogs.com/smyhvae/ 文章来源:http://www.cnblogs.com/smyhvae/p/5 ...
- CF380C. Sereja and Brackets[线段树 区间合并]
C. Sereja and Brackets time limit per test 1 second memory limit per test 256 megabytes input standa ...
- File类-文件基本操作
package com.java.io; import java.io.File; import java.io.IOException; import java.math.BigDecimal; i ...
- NYOJ 762
容斥原理 http://blog.csdn.net/shiren_bod/article/details/5787722
- IntelliJ IDEA设置JVM运行参数
2015十一月 28 原 IntelliJ IDEA设置JVM运行参数 分类:JavaSE (11566) (1) 打开 IDEA 安装目录,看到有一个 bin 目录,其中有两个 vmoptions ...