`
niulanshan
  • 浏览: 563872 次
文章分类
社区版块
存档分类
最新评论

Mapped Statements collection does not contain value for WaitMissionMapper.updateWait

 
阅读更多

1、错误描述

### Error updating database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for WaitMissionMapper.updateWait
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for WaitMissionMapper.updateWait
	at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:73)
	at core.util.CustomSqlSessionTemplate$SqlSessionInterceptor.invoke(CustomSqlSessionTemplate.java:316)
	at com.sun.proxy.$Proxy21.update(Unknown Source)
	at core.util.CustomSqlSessionTemplate.update(CustomSqlSessionTemplate.java:212)
	at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:204)
	at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:708)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
	at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
	at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
	at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)
	at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
	at org.springframework.aop.framework.CglibAopProxy$DynamicAdvisedInterceptor.intercept(CglibAopProxy.java:644)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at org.springframework.web.method.support.InvocableHandlerMethod.invoke(InvocableHandlerMethod.java:215)
	at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:132)
	at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:104)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandleMethod(RequestMappingHandlerAdapter.java:749)
	at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:689)
	at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:83)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:938)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:870)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:961)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:863)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:650)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:837)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:731)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.eclipse.jetty.continuation.ContinuationFilter.doFilter(ContinuationFilter.java:137)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
	at org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
	at core.security.CRPAuthenticationFilter.doFilterInternal(CRPAuthenticationFilter.java:282)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
	at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
	at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
	at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
	at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
	at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
	at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:169)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:436)
	at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.doRun(AprEndpoint.java:2517)
	at org.apache.tomcat.util.net.AprEndpoint$SocketProcessor.run(AprEndpoint.java:2506)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
	at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error updating database.  Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for WaitMissionMapper.updateWait
### Cause: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for WaitMissionMapper.updateWait
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:23)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:150)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:606)
	at core.util.CustomSqlSessionTemplate$SqlSessionInterceptor.invoke(CustomSqlSessionTemplate.java:305)
	... 80 more
Caused by: java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for WaitMissionMapper.updateWait
	at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:768)
	at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:603)
	at org.apache.ibatis.session.Configuration.getMappedStatement(Configuration.java:596)
	at org.apache.ibatis.session.defaults.DefaultSqlSession.update(DefaultSqlSession.java:147)

2、错误原因

<update id="update" parameterType="Student">
          update t_student_info s set s.stu_name = #{stuName}
                        where s.stu_id = #{stuId}
</update>
Mybatis中配置的id为update,但是用的时候却是updateWait

3、解决办法

保证Mybatis中id值和调用的一致就行

分享到:
评论

相关推荐

    mybatisMapped报错 Statements collection does not contain value for

    在使用MyBatis框架进行数据库操作时,可能会遇到“Mapped Statements collection does not contain value for”这样的错误提示。这通常意味着MyBatis无法找到与指定的ID相对应的映射语句。下面将详细解释这个问题的...

    如何解决Mybatis--java.lang.IllegalArgumentException: Result Maps collection already contains value for X

    在整合Spring、Struts2和Mybatis的过程中,可能会遇到各种问题,其中之一就是`java.lang.IllegalArgumentException: Result Maps collection already contains value for X`。这个问题通常出现在Mybatis配置文件中,...

    mybatis 报空值异常

    除了上述情况外,还可能出现其他类型的错误,如 `MappedStatements collection does not contain value for...` 这类异常,通常是由以下几个原因导致的: 1. **Mapper XML 中缺少命名空间** 确保 mapper 文件中...

    基于springboot+mybatis实现的外卖订餐系统源码+项目说明(毕设).zip

    Mapped Statements collection already contains value for com.m.dao.AdminDao.login at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.autowireByType ...

    MyBatis User Guide.rar

    Exploring Mapped SQL Statements . 7 A Note about Namespaces........... 8 Scope and Lifecycle .......... 9 Mapper Configuration XML 10 properties ........ 11 settings ............ 12 typeAliases...

    Mathematica for Bioinformatics. A Wolfram Language Approach to Omics

    This monograph presents an introduction to using the Wolfram Language for Bioinformatics. The content stems from many years of using the Wolfram Language, previously as Mathematica, in different ...

    Collections

    Methods like `setValue(_:forKey:)`, `updateValue(_:forKey:)`, and `removeValue(forKey:)` are used for these operations. ##### Sorting a Dictionary Since dictionaries are inherently unordered, ...

    一个struts2的例子:彻底解决STRUTS2 错误There is no Action mapped for namespace / and action name login

    前几天在网上下载一个struts2的helloword的例子,那个作者也真够缺德的,搞个错误的程序,害得我查了一天的程序错误。 最后发现竟然是struts.xml被写成啦sturts.xml。 碰见这样的问题先鄙视下提供例子的作者, ...

    精益生产.西奥.X.ppt

    2. mapped the value stream 3. Create a future state value stream 4. Implement the future state value stream 5. Continuously improve 精益生产的目标是实现高质量、低成本、短周期的生产目标。为了实现这个...

    DSP280x_Headers_nonBIOS.cmd

    This file is for use in Non-BIOS applications. Linker command file to place the peripheral structures used within the DSP280x headerfiles into the...which does not include the PieVectorTable structure.

    free_and_open_source_software_for_development.pdf

    has not been well mapped. This book is about FOSS for Development (FOSS4D). We will focus on the Least Developed Countries (LDC's) and primarily on the African context. Most of the LDC's are in Africa...

    EurekaLog_7.5.0.0_Enterprise

    31)..Fixed: Removed exported helper _462EE689226340EAA982C5E8307B3F9E function (replaced with mapped file) 32)..Changed: Descriptions of EurekaLog project options now list corresponding property names...

    JLink_Windows_V648.zip

    DLL: Renesas RX: When connecting to locked RX devices via JTAG (does not affect FINE!), 16-byte IDCODE (OSIS) could be rejected even though the correct code was given. Fixed. DLL: Renesas S7G2: QSPI ...

    foobar 1.1.6 beta1

    ■ Added support for multi-value WMA tags. ■ Read more about tagging changes ■ Improved reading of MP3 encoding information headers written by alpha versions of LAME. ■ ReplayGain scanner now ...

    微软内部资料-SQL性能优化2

    Assuming the page reference does not result in an access violation, a page fault can be either hard or soft. A hard page fault results in a read from disk, either a page file or memory-mapped file. A...

    acpi控制笔记本风扇转速

    _HID does not match the predefined PCI Root Bridge IDs, the _CID list (if present) is now obtained and also checked for an ID match. Implemented additional support for the PCI _ADR execution: up...

    MemoryMappedFile 使用 共享内存循环读写

    MemoryMappedFile 使用 C# 内存中分配一大块地址. 前边分配一个用与共同配置用 后边N个结构体 for循环建 一般用到此问题,两本程序 一个读一个写 循环读写 ----2015/09/24 Lyndon 上海----

    Visual.Studio.Tools.for.Office.Using.C.Sharp.with.Excel.Word.Outlook.and.InfoPath.Sep.2005

    Copyright Praise for Visual Studio Tools for Office Microsoft .NET Development Series Titles in the Series About the Authors Foreword Preface Acknowledgments ...

Global site tag (gtag.js) - Google Analytics