Mapped Statements collection does not contain value for com.xxxx.dao.impl.AreaDAOImpl.findByCode
org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.sports.basic.area.dao.impl.AreaDAOImpl.findByCode
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.sports.basic.area.dao.impl.AreaDAOImpl.findByCode
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:365)
at com.sun.proxy.$Proxy16.selectOne(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectOne(SqlSessionTemplate.java:160)
at com.sports.basic.area.dao.impl.AreaDAOImpl.findByCode(AreaDAOImpl.java:22)
at com.sports.basic.area.service.impl.AreaServiceImpl.getAreaByCode(AreaServiceImpl.java:24)
at com.sports.basic.area.AreaServcieTest.test1(AreaServcieTest.java:36)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:45)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:42)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74)
at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:83)
at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:231)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:88)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:231)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:60)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:229)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:50)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:222)
at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61)
at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:71)
at org.junit.runners.ParentRunner.run(ParentRunner.java:300)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:174)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.sports.basic.area.dao.impl.AreaDAOImpl.findByCode
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.sports.basic.area.dao.impl.AreaDAOImpl.findByCode
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:26)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:111)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:102)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:66)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:355)
... 36 more
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for com.sports.basic.area.dao.impl.AreaDAOImpl.findByCode
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:797)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:631)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:624)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:107)
... 43 more
郁闷了半天,无语,我的其他mapper文件都是xxxx-mapper.xml
而这个mapper是从其他地方copy过来的,太像了,尼玛,是xxxx_mapper.xml
坑了我好几个小时,麻蛋
Mapped Statements collection does not contain value for com.xxxx.dao.impl.AreaDAOImpl.findByCode的更多相关文章
- Mapped Statements collection does not contain value fo
Mapped Statements collection does not contain value for后面是什么类什么方法之类的: 错误原因有几种: 1.mapper.xml中没有加入name ...
- mybatis报错Mapped Statements collection does not contain value for com.inter.IOper
首页 > 精品文库 > mybatis报错Mapped Statements collection does not contain value for com.inter.IOper m ...
- Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for …
编译通过并且运行web成功后,访问的页面不需要连接数据库,不牵扯到反射调用实体类就不会报错, 报错内容如下: [WARNING] org.springframework.web.util.Nested ...
- 【原创】Mapped Statements collection does not contain value for DaoImpl.method
问题: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.Pers ...
- Spring+Mybatis整合报错Mapped Statements collection does not contain value原因之一
报错如下: ### Error updating database. Cause: java.lang.IllegalArgumentException: Mapped Statements coll ...
- Mapped Statements collection does not contain value for ResearcherMapper.方法名
搞了半天, 原来是映射文件没加, 新手常遇到的问题. Mapped Statements collection does not contain value for后面是什么类什么方法之类的: 错误原 ...
- Mapped Statements collection does not contain value for TaskMapper.selectByPrimaryKey
Mapped Statements collection does not contain value for后面是什么类什么方法之类的: 错误原因有几种: 1.mapper.xml中没有加入name ...
- mybatis mapper.xml 写关联查询 运用 resultmap 结果集中 用 association 关联其他表 并且 用 association 的 select 查询值 报错 java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for mybatis.map
用mybaits 写一个关联查询 查询商品表关联商品规格表,并查询规格表中的数量.价格等,为了sql重用性,利用 association 节点 查询 结果并赋值报错 商品表的mapper文件为Gooo ...
- 错误: Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for studentDao.insert
详细错误信息: org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: java. ...
随机推荐
- Android中MVP模式与MVC模式比較(含演示样例)
原文链接 http://sparkyuan.me/ 转载请注明出处 MVP 介绍 MVP模式(Model-View-Presenter)是MVC模式的一个衍生. 主要目的是为了解耦,使项目易于维护. ...
- iOS 根据圆心的坐标点、半径、当前手势所在的坐标点,计算出圆的运动轨迹坐标
/** * 根据圆心的坐标点.半径.当前手势所在的坐标点,计算出圆的运动轨迹坐标 * @param radius 圆心半径 * @param centerCircle 圆心的坐标点 * @param ...
- MVC 之 缓存机制(二)
八.应用程序缓存 应用程序缓存提供了一种编程方式,可通过键/值对将任意数据存储在内存中. 使用应用程序缓存与使用应用程序状态类似. 但是,与应用程序状态不同的是,应用程序缓存中的数据是易失的, 即数据 ...
- Python实现支付宝当面付之——扫码支付
转载请注明原文地址:http://www.cnblogs.com/ygj0930/p/7680348.html 一:配置信息准备 登录蚂蚁金服开放平台:https://open.alipay.com/ ...
- wwindows文件放入linux后多出换行符
将 windows文件移到linux系统下会在文件行末尾多了一个换行符^M 使用命令cat -v tmp.c可以看到每行后边有^M字符 为了解决这个问题,我们用如下命令:touch love_tmp. ...
- yii框架的部署方法
yii框架(yii framework)的部署方法 刚開始学习的人来说,部署yii框架还是有一定难度的,Yii是一个基于组件.用于开发大型 Web 应用的高性能 PHP 框架.Yii提供了今日Web ...
- ANTLR#1:描述一个简单计算器
https://blog.csdn.net/kisimple/article/details/44948603
- Axure 实现批量的勾选和反选
百度网盘:http://pan.baidu.com/s/1gf4RR2b 1.如何实现批量的勾选和反选的操作? 2.步骤 1)创建3个复选框.2个按钮(全选/反选) 2)设置全选按钮点击事件——选中“ ...
- python之模块 os
# -*- coding: utf-8 -*- #python 27 #xiaodeng #python之模块 os import os ''' FUNCTIONS abort(...)#暂不了解 a ...
- Weblogic部署gbk编码的项目乱码
问题描述: weblogic默认部署的项目编码utf-8,由于项目特殊编码gbk导致打开项目中文全是乱码! 心哇凉哇凉.... 问题解决: 01.调休jvm参数 xxx_domains/bin/set ...