Mybatis错误——Could not find parameter map java.util.Map
错误信息
org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map java.util.Map
at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementParameterMap(MapperBuilderAssistant.java:319)
at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:283)
at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:107)
at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:698)
at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:668)
at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:663)
at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:180)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:43)
at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:58)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:51)
at com.sun.proxy.$Proxy30.getStudentByAccountAndPwd(Unknown Source)
at com.taohan.online.exam.service.impl.StudentInfoServiceImpl.getStudentByAccountAndPwd(StudentInfoServiceImpl.java:54)
at com.taohan.online.exam.handler.StudentInfoHandler.validateLoginStudent(StudentInfoHandler.java:190)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:222)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:137)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:110)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:814)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:737)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:85)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:959)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:893)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:969)
at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:871)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:845)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.HiddenHttpMethodFilter.doFilterInternal(HiddenHttpMethodFilter.java:77)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:121)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.IllegalArgumentException: Parameter Maps collection does not contain value for java.util.Map
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:797)
at org.apache.ibatis.session.Configuration.getParameterMap(Configuration.java:570)
at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementParameterMap(MapperBuilderAssistant.java:317)
... 49 more
解决
光看表面意思就是不能找到参数 map,光看表面可能会把你带到另一个方向。
但实际就是在 Mapper 文件中将某个 statement 的 parameterType 错写成了 parameterMap。
<select id="getChooseInfoWithSumScore" parameterMap="java.util.Map"(错误源) resultMap="queryChooseInfosResultMap">
SELECT
a.chooseId,
a.chooseResult,
a.subjectId,
b.rightResult,
b.subjectScore
FROM ExamChooseInfo a
INNER JOIN subjectInfo b ON a.subjectId=b.subjectId
WHERE studentId=#{studentId} AND examPaperId=#{examPaperId};
</select>
Mybatis错误——Could not find parameter map java.util.Map的更多相关文章
- mybatis异常:Could not find result map Java.util.Map 问题分析及解决 定位不到具体的位置的错误
mybatis异常:Could not find result map Java.util.Map 问题分析及解决 报这个错误呢,很难受的就是你定位不到具体的地方,找不到位置修改,你只知道有错误,但是 ...
- java.sql.SQLException: Invalid parameter object type. Expected 'java.util.Map' but found 'java.lang.String 转载
java.sql.SQLException: Invalid parameter object type. Expected 'java.util.Map' but found 'java.lang. ...
- eclipse出现错误:he type java.util.Map$Entry cannot be resolved. It is indirectly referenced
eclipse出现错误:he type java.util.Map$Entry cannot be resolved. It is indirectly referenced jre 换成6的就好了选 ...
- 错误:java.util.Map is an interface, and JAXB can't handle interfaces.
问题: 在整合spring+cxf时报错java.util.Map is an interface, and JAXB can't handle interfaces. 解决方法: 将服务端的serv ...
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.HashMap
这样的配置有问题吗? <select id="getFreightCollectManagementList" resultMap="java.util.HashM ...
- java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Map
1.错误描写叙述 java.lang.ClassCastException: java.util.ArrayList cannot be cast to java.util.Map at servic ...
- Could not find result map java.util.HashMap
Could not find result map java.util.HashMap 找不到结果图java.util.HashMap MyBatis 找不到返回的 'resultMap'!把resu ...
- No converter found capable of converting from type [java.lang.String] to type [java.util.Map<java.lang.String, java.lang.String>]
java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.test.conte ...
- java.util.Map.Entry接口
java.util.Map.Entry接口主要就是在遍历map的时候用到,给你个例子:package test;import java.util.*;import java.util.Map.Entr ...
随机推荐
- Web前端汇总
http://www.cnblogs.com/bigboyLin/p/5272902.html HTML/CSS部分 1.什么是盒子模型? 在网页中,一个元素占有空间的大小由几个部分构成,其中包括 ...
- Node“getTextContent() is undefined for the type Node”处理办法
最近一个项目在MyEclipse导入后总是报getTextContent() is undefined for the type Node错误. 经过查找原来是因为Node类为JDK中自带的(org. ...
- ASP.NET MVC应用程序中支持用户使用腾讯QQ和微信以及新浪微博的第三方登录
什么是第三方授权登录,就是一些大家都会有的帐号如QQ.微信.淘宝.微博等账户.通过那些巨头公司提供的api直接实现登录. 当然,我们是不可能得到你的用户名和密码的.不了解的人,可能会存在这个疑虑.我们 ...
- excel 录入oracle 方法
http://blog.itpub.net/28602568/viewspace-1797410/ 1.方法1:外部表 1.将excel另存为.txt格式(2种txt 格式都可以),再传到数据库dir ...
- windows 中常用的 cmd 命令汇总
查看系统基本信息: cmd -> systeminfo 或 run -> dxdiag 查询主板出厂日期: cmd -> wmic bios get releasedate 关闭本地 ...
- SpringBoot 2.x (1):手动创建项目与自动创建项目
SpringBoot 2.x基于Spring Framework 5.x 环境需求如下: JDK1.8或以上 Maven3.2或以上 这里我使用的是Eclipse,IDEA这个工具很强大,但不习惯它 ...
- 树莓派GPIO点亮第一个led
代码如下: 注意:::::此时的GPIO口为18编号口而非GPIO18 import RPi.GPIO as GPIO //引入函数库 import time RPi.GPIO.setmode(GPI ...
- 我的DBDA类
<?php class DBDA { public $host="localhost"; public $uid="root"; public $pwd= ...
- facade模式-服务-配置----系统生成与配置
facade模式对外提供一组相关服务: 对内整合子系统: facade模式的创建过程需要依赖外部的配置. 配置完成以后才能使用服务. 推广开来,所有系统都需要生成与配置,然后才能对外提供服务.
- layui修改数据的时候下拉框和选择框默认选中
// 获取需求类型function getType() { var typeHtml = ''; $.ajax({ url: pUrl + 'back_findTypeList.do', type: ...