org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.HashMap
这样的配置有问题吗?
<select id="getFreightCollectManagementList" resultMap="java.util.HashMap" parameterType="com.rms.providers.dto.AccountingPayableDto">
有的, 出现mybatis 错误:
-- :: - [http-nio--exec-] DEBUG - Added HttpServletResponse Cookie [rememberMe=deleteMe; Path=/; Max-Age=; Expires=Sun, -Aug- :: GMT]
-- :: - [http-nio--exec-] DEBUG - org.apache.shiro.authc.AuthenticationException: Authentication failed for token submission [com.hercules.rms.web.shiro.CaptchaUsernamePasswordToken - luokai, rememberMe=false (:::::::)]. Possible unexpected error? (Typical or expected login exceptions should extend from AuthenticationException).
at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:)
at org.apache.shiro.mgt.AuthenticatingSecurityManager.authenticate(AuthenticatingSecurityManager.java:)
at org.apache.shiro.mgt.DefaultSecurityManager.login(DefaultSecurityManager.java:)
at org.apache.shiro.subject.support.DelegatingSubject.login(DelegatingSubject.java:)
at org.apache.shiro.web.filter.authc.AuthenticatingFilter.executeLogin(AuthenticatingFilter.java:)
at org.apache.shiro.web.filter.authc.FormAuthenticationFilter.onAccessDenied(FormAuthenticationFilter.java:)
at org.apache.shiro.web.filter.AccessControlFilter.onAccessDenied(AccessControlFilter.java:)
at org.apache.shiro.web.filter.AccessControlFilter.onPreHandle(AccessControlFilter.java:)
at org.apache.shiro.web.filter.PathMatchingFilter.isFilterChainContinued(PathMatchingFilter.java:)
at org.apache.shiro.web.filter.PathMatchingFilter.preHandle(PathMatchingFilter.java:)
at org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:)
at org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:)
at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:)
at org.apache.shiro.web.servlet.AbstractShiroFilter$.call(AbstractShiroFilter.java:)
at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:)
at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:)
at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:)
at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:)
at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:)
at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:)
at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:)
at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:)
at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:)
at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:)
at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:)
at java.lang.Thread.run(Thread.java:)
Caused by: org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.HashMap
at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementResultMap(MapperBuilderAssistant.java:)
at org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement(MapperBuilderAssistant.java:)
at org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode(XMLStatementBuilder.java:)
at org.apache.ibatis.session.Configuration.buildAllStatements(Configuration.java:)
at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:)
at org.apache.ibatis.session.Configuration.hasStatement(Configuration.java:)
at org.apache.ibatis.binding.MapperMethod$SqlCommand.<init>(MapperMethod.java:)
at org.apache.ibatis.binding.MapperMethod.<init>(MapperMethod.java:)
at org.apache.ibatis.binding.MapperProxy.cachedMapperMethod(MapperProxy.java:)
at org.apache.ibatis.binding.MapperProxy.invoke(MapperProxy.java:)
at com.sun.proxy.$Proxy24.getUserInfoByLoginNameAndUserCode(Unknown Source)
at com.hercules.rms.providers.service.impl.UserInfoServiceImpl.getUserInfoByLoginNameAndUserCode(UserInfoServiceImpl.java:)
at com.hercules.rms.web.shiro.ShiroDbRealm.doGetAuthenticationInfo(ShiroDbRealm.java:)
at org.apache.shiro.realm.AuthenticatingRealm.getAuthenticationInfo(AuthenticatingRealm.java:)
at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doSingleRealmAuthentication(ModularRealmAuthenticator.java:)
at org.apache.shiro.authc.pam.ModularRealmAuthenticator.doAuthenticate(ModularRealmAuthenticator.java:)
at org.apache.shiro.authc.AbstractAuthenticator.authenticate(AbstractAuthenticator.java:)
... more
Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for java.util.HashMap
at org.apache.ibatis.session.Configuration$StrictMap.get(Configuration.java:)
at org.apache.ibatis.session.Configuration.getResultMap(Configuration.java:)
at org.apache.ibatis.builder.MapperBuilderAssistant.setStatementResultMap(MapperBuilderAssistant.java:)
... more
似曾相识的错误:
org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.HashMap
Caused by: java.lang.IllegalArgumentException: Result Maps collection does not contain value for java.util.HashMap
原来是 resultMap 的问题, 改成resultType 就好了! 另外, parameterType 有 parameterMap 对应,
具体在文件中可以找到: E:\maven\repo\org\mybatis\mybatis\3.2.8\mybatis-3.2.8.jar!\org\apache\ibatis\builder\xml\mybatis-3-mapper.dtd , 包括:
<!ELEMENT select (#PCDATA | include | trim | where | set | foreach | choose | if | bind)*>
<!ATTLIST select
id CDATA #REQUIRED
parameterMap CDATA #IMPLIED
parameterType CDATA #IMPLIED
resultMap CDATA #IMPLIED
resultType CDATA #IMPLIED
resultSetType (FORWARD_ONLY | SCROLL_INSENSITIVE | SCROLL_SENSITIVE) #IMPLIED
statementType (STATEMENT|PREPARED|CALLABLE) #IMPLIED
fetchSize CDATA #IMPLIED
timeout CDATA #IMPLIED
flushCache (true|false) #IMPLIED
useCache (true|false) #IMPLIED
databaseId CDATA #IMPLIED
lang CDATA #IMPLIED
resultOrdered (true|false) #IMPLIED
resultSets CDATA #IMPLIED
>
具体参见:
http://www.mybatis.org/mybatis-3/zh/configuration.html
org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.util.HashMap的更多相关文章
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.lang.Integer
如图: 详细错误信息如下: org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.l ...
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.hp.entity.Emp
错误提示代码: org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.hp.entit ...
- 【mybatis】mybatis方法访问报错:org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.pisen.cloud.luna.ms.goods.base.domain.GoodsConfigQuery
在调用mapper.xml中的方法的时候,报错: org.apache.ibatis.builder.IncompleteElementException: Could not find result ...
- org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.abc.beans.Minister
使用mybatis进行一对多嵌套查询时出错,错误原因: <select id="findMinisterById" resultMap="com.abc.beans ...
- org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map com.hyzn.historicalRecord.dao.ITB_HISTORYLOGDAO.TB_HISTORYLOGResultMap
用了很久的myBatis,忽然出现这个错误,感觉配置什么的都是正确的,错误如下: org.apache.ibatis.builder.IncompleteElementException: Could ...
- MyBatis的mapper.xml文件的参数问题:org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map
配置参数类型有两种选择,即:parameterType和parameterMap 不管参数是否是基本数据类型还是map类型,都是使用parameterType. 版权声明:本文为博主原创文章,未经博主 ...
- org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map
mybatis 出现这个错误是 参数类型写错了.parameterType 写成了parameterMap
- Mybatis报错:org.apache.ibatis.builder.IncompleteElementException
org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.lang.Integer遇到这 ...
- [springMVC - 1A] - Request processing failed; nested exception is org.apache.ibatis.builder.IncompleteElementException
一月 14, 2016 1:30:07 下午 org.apache.catalina.core.StandardWrapperValve invoke严重: Servlet.service() for ...
随机推荐
- Android开发 ---SQLite数据库,lock文件,结果集游标,适配器,安全退出,给连接设置下划线,编辑器,投影,ContentValues存储,DbHelper,activity栈
目录截图: 1.activity_main.xml 主界面效果: <?xml version="1.0" encoding="utf-8"?> &l ...
- OLAP了解与OLAP引擎——Mondrian入门
一. OLAP的基本概念 OLAP(On-Line Analysis Processing)在线分析处理是一种共享多维信息的快速分析技术:OLAP利用多维数据库技术使用户从不同角度观察数据:OLAP ...
- js文本转语音
百度找了好多,大概分为两种,一种使用百度语音的API,另一种使用H5自带(低版本不兼容) 下面为一个模拟页面 <!DOCTYPE html><html lang="en&q ...
- Java学习笔记42(数据库连接池 druid连接池)
druid连接池: 是阿里的连接池,druid的稳定性及效率都很高,目前用的比较广,所以建议开发过程中尽量用druid连接池(支持国产最重要) druid连接池也需要配置文件,配置文件必须是prope ...
- 5.移动终端App测试点归纳
以下所有测试最后必须在真机上完整的执行. 1 安装.卸载测试 1.1 在真机上.第三方软件(xy苹果助手.91.安卓助手)的安装与卸载 1.2 安装在手机卡上 或 SD卡上 (不同的IOS和安卓版本) ...
- Java面试通关秘籍汇总集
一.基础篇 1.1.Java基础 面向对象的特征:继承.封装和多态 final, finally, finalize 的区别 Exception.Error.运行时异常与一般异常有何异同 请写出5种常 ...
- 实验 2:备份和还原IOS
SW1配置 Switch>en Switch#conf t Enter configuration commands, one per line. End with CNTL/Z. Switch ...
- Python pip源更改
将pip源设置为阿里源 windows 打开文件资源管理器(文件夹地址中) 地址栏上面输入 %appdata% 在这里面新建一个文件夹pip 在pip文件夹里面新建一个文件叫做 pip.ini,内容如 ...
- JAVA高级篇(一、JVM基本概念)
一.什么是JVM VM的中文名称叫Java虚拟机,它是由软件技术模拟出计算机运行的一个虚拟的计算机. JVM也充当着一个翻译官的角色,我们编写出的Java程序,是不能够被操作系统所直接识别的,这时候J ...
- Arcmap连接数据库需管理员获取许可——创建ArcSDE连接文件
一.在装有server的服务器上创建ArcSDE连接文件 1.打开ArcMap<<ArcToolBox<<数据管理工具<<工作空间<<创建ArcSDE连 ...