先贴出详细的报错信息

2019-11-05 10:10:00 [executor-1] ERROR [org.quartz.core.JobRunShell:225] - Job DEFAULT.effectToothInsuranceJobDetail threw an unhandled Exception:
org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'effectToothInsurance' on target class [class com.xxx.mcc.common.QuartzSrvBean] failed; nested exception is 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 PatientInsuranceInfo.findPatientInsuranceInfoByCondition
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for PatientInsuranceInfo.findPatientInsuranceInfoByCondition
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:273)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: 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 PatientInsuranceInfo.findPatientInsuranceInfoByCondition
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for PatientInsuranceInfo.findPatientInsuranceInfoByCondition
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)
at com.sun.proxy.$Proxy8.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)
at com.xxx.mcp.dao.PatientInsuranceInfoDAO.findPatientInsuranceInfoByCondition(PatientInsuranceInfoDAO.java:22)
at com.xxx.mcp.service.impl.PatientInsuranceInfoServiceImpl.effectToothInsurance(PatientInsuranceInfoServiceImpl.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy28.effectToothInsurance(Unknown Source)
at com.xxx.mcc.common.QuartzSrvBean.effectToothInsurance(QuartzSrvBean.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:264)
... 5 more
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for PatientInsuranceInfo.findPatientInsuranceInfoByCondition
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for PatientInsuranceInfo.findPatientInsuranceInfoByCondition
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:122)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
... 29 more
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for PatientInsuranceInfo.findPatientInsuranceInfoByCondition
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:832)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:665)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:658)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:119)
... 35 more
2019-11-05 10:10:00 [executor-1] ERROR [org.quartz.core.ErrorLogger:2339] - Job (DEFAULT.effectToothInsuranceJobDetail threw an exception.
org.quartz.SchedulerException: Job threw an unhandled exception. [See nested exception: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'effectToothInsurance' on target class [class com.xxx.mcc.common.QuartzSrvBean] failed; nested exception is 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 PatientInsuranceInfo.findPatientInsuranceInfoByCondition
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for PatientInsuranceInfo.findPatientInsuranceInfoByCondition]
at org.quartz.core.JobRunShell.run(JobRunShell.java:227)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.springframework.scheduling.quartz.JobMethodInvocationFailedException: Invocation of method 'effectToothInsurance' on target class [class com.xxx.mcc.common.QuartzSrvBean] failed; nested exception is 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 PatientInsuranceInfo.findPatientInsuranceInfoByCondition
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for PatientInsuranceInfo.findPatientInsuranceInfoByCondition
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:273)
at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86)
at org.quartz.core.JobRunShell.run(JobRunShell.java:216)
... 3 more
Caused by: 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 PatientInsuranceInfo.findPatientInsuranceInfoByCondition
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for PatientInsuranceInfo.findPatientInsuranceInfoByCondition
at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:75)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:371)
at com.sun.proxy.$Proxy8.selectList(Unknown Source)
at org.mybatis.spring.SqlSessionTemplate.selectList(SqlSessionTemplate.java:198)
at com.xxx.mcp.dao.PatientInsuranceInfoDAO.findPatientInsuranceInfoByCondition(PatientInsuranceInfoDAO.java:22)
at com.xxx.mcp.service.impl.PatientInsuranceInfoServiceImpl.effectToothInsurance(PatientInsuranceInfoServiceImpl.java:37)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:183)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:110)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:90)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)
at com.sun.proxy.$Proxy28.effectToothInsurance(Unknown Source)
at com.xxx.mcc.common.QuartzSrvBean.effectToothInsurance(QuartzSrvBean.java:52)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.util.MethodInvoker.invoke(MethodInvoker.java:273)
at org.springframework.scheduling.quartz.MethodInvokingJobDetailFactoryBean$MethodInvokingJob.executeInternal(MethodInvokingJobDetailFactoryBean.java:264)
... 5 more
Caused by: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for PatientInsuranceInfo.findPatientInsuranceInfoByCondition
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for PatientInsuranceInfo.findPatientInsuranceInfoByCondition
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:122)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:113)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:358)
... 29 more
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for PatientInsuranceInfo.findPatientInsuranceInfoByCondition
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:832)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:665)
at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:658)
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:119)
... 35 more

我遇到这个问题的原因是mapper.xml 没有加入到 mybatis-config.xml 中

下面总结网上收集到其他可能产生同样报错的原因

Mapped Statements collection does not contain value for后面是什么类什么方法之类的: 
错误原因有几种: 
1、mapper.xml中没有加入namespace 
2、mapper.xml中的方法和接口mapper的方法不对应 
3、mapper.xml没有加入到mybatis-config.xml中(即总的配置文件),例外:配置了mapper文件的包路径的除外 
4、mapper.xml文件名和所写的mapper名称不相同。

参考:

https://bbs.csdn.net/topics/390656730?page=1

https://bbs.csdn.net/topics/390306821

https://blog.csdn.net/zkn_cs_dn_2013/article/details/48007781

原文链接:

https://www.cnblogs.com/poterliu/p/11804985.html

 

Mapped Statements collection does not contain value for xxx.xxx 错误原因&解决方案的更多相关文章

  1. Spring+Mybatis整合报错Mapped Statements collection does not contain value原因之一

    报错如下: ### Error updating database. Cause: java.lang.IllegalArgumentException: Mapped Statements coll ...

  2. Springboot+Mybatisplus替换mybatis整合报错Mapped Statements collection does not contain value

    问题一: mybatisPlus完全兼容mybatis,一般来说直接替换掉就可以了,如果mybatis的数据源不能取消创建的话,就注掉mybatisplus的数据源 //@Configurationp ...

  3. Mapped Statements collection does not contain value fo

    Mapped Statements collection does not contain value for后面是什么类什么方法之类的: 错误原因有几种: 1.mapper.xml中没有加入name ...

  4. 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 ...

  5. Error querying database. Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for …

    编译通过并且运行web成功后,访问的页面不需要连接数据库,不牵扯到反射调用实体类就不会报错, 报错内容如下: [WARNING] org.springframework.web.util.Nested ...

  6. 【原创】Mapped Statements collection does not contain value for DaoImpl.method

    问题: org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.Pers ...

  7. Mapped Statements collection does not contain value for ResearcherMapper.方法名

    搞了半天, 原来是映射文件没加, 新手常遇到的问题. Mapped Statements collection does not contain value for后面是什么类什么方法之类的: 错误原 ...

  8. Mapped Statements collection does not contain value for TaskMapper.selectByPrimaryKey

    Mapped Statements collection does not contain value for后面是什么类什么方法之类的: 错误原因有几种: 1.mapper.xml中没有加入name ...

  9. 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 ...

  10. 错误: Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for studentDao.insert

    详细错误信息: org.apache.ibatis.exceptions.PersistenceException: ### Error updating database. Cause: java. ...

随机推荐

  1. 43 编译原理及cmake使用手册学习

    0 引言 大量开源库需要通过cmake编译后使用,了解cmake的基本指令以及CMakeLists.txt的写法非常重要,其基础是了解编译原理.另外,为了对cmake编译的代码进行调试,需要了解CMa ...

  2. 牛客多校第九场 D Knapsack Cryptosystem 背包

    题意: 给你32个物品,给定一个容积,让你恰好把这个背包装满,求出装满的方案 题解: 暴力计算的话,复杂度$2^{32}$肯定会炸,考虑一种类似bsgs的算法,先用$2^{16}$的时间遍历前一半物品 ...

  3. ZK4字命令

    zookeeper4字命令:两种方式,1.通过telnet链接服务器,执行stat.2.echo stat|nc xxx.xxx.xxx.xxx 2181效果是一样的conf:zk服务器运行时的基本信 ...

  4. 剑指offer——15剪绳子

    题目描述 给你一根长度为n的绳子,请把绳子剪成m段(m.n都是整数,n>1并且m>1),每段绳子的长度记为k[0],k[1],...,k[m].请问k[0]xk[1]x...xk[m]可能 ...

  5. 802.11ac wave2的前世今生

    2015年下半年,高通.博通.RTL等芯片厂商相继发布了满足802.11ac wave2要求的芯片,WLAN及终端厂商也迅速跟进推出相应的产品和终端.802.11ac wave2在多方推动下于2015 ...

  6. jquery网页定位导航特效

    <!DOCTYPE html> <html lang="en"> <head> <script src="http://code ...

  7. Java设计模式(一)外观模式(门面模式)- 结构型模式

    模式的定义 门面模式(Facade Pattern)也叫做外观模式,是一种比较常用的封装模式,其定义如下:要求一个子系统的外部与其内部通信必须通过一个统一的对象进行.门面模式提供一个高层次的接口,使得 ...

  8. myeclipse问题

    eclipse使用过程中发现汉字太小,几乎不可辨识. 更改办法:eclipse界面依次选择“window”–“preference”–“general”–“appearance”–“color and ...

  9. C#让两个长度相同的数组一一对应

    比如: string a[]={"x","y","z"} "} 用字典使其一一对应 Dictionary<string, s ...

  10. python库之mlxtend

    一.安装 conda install mlxtend --channel conda-forge 具体请看参考文献一 二.入门例子 请看参考文献2上github的举例 参考文献 http://rasb ...