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 ...
随机推荐
- effective java——12考虑实现coparable接口
float和double类型的主要设计目标是为了科学计算和工程计算.他们执行二进制浮点运算,这是为了在广域数值范围上提供较为精确的快速近似计算而精心设计的.然而,它们没有提供完全精确的结果,所以不应该 ...
- Javascript Canvas验证码
用Canvas画的验证码,效果图如下 1.验证码的JS代码,保存到一个名称是validatedCode.js的文件内,代码如下: (function(window,document){ functio ...
- SpringBoot的学习【2.分析HelloWorld的依赖】
1.分析引入的父类项目 引入的父类如下. 点击进去发现又引入了一个父类 点击进去发现是spring的版本控制和相应的依赖. so~这就是springboot的终极大包.想用springboot开发的时 ...
- C++11 类型后置语法
#include <iostream> #include <typeinfo> #include <type_traits> using namespace std ...
- linux (centOS)安装jdk+tomcat+nginx
一..安装jdk, 下载jdk有两种方式: 1.直接去官网找相应版本下载:http://www.oracle.com/technetwork/java/javase/downloads/index.h ...
- IC卡触点释放时序
IC卡触点释放时序过程如下: 要点: 终端必须通过把RST置为低电平状态来启动释放时序: 在置RST为低电平之后VCC断电之前,终端必须将CLK和IO设定为低电平状态: 在置RST.CLK和IO为低电 ...
- mysql数据库-定义函数-存储过程写法
------------- mysql 定义自定义函数写法 DELIMITER $$ USE `iwmsdb`$$ DROP FUNCTION IF EXISTS `F_WM_DBNAME`$$ C ...
- 整理面试问题iOS
1.如何添加手势操作. 我们以在view上来举例 //创建一个view UIView *tapView=[UIView new]; tapView.frame=CGRectMake(, , kWidt ...
- this指向问题 --无return
this的指向在函数定义的时候是确定不了的只有在函数执行的时候才能确定this到底指向谁.this指向上一级对象 1.函数调用,this指向window var color = "red&q ...
- 一款我常用到的手机app
我从初中开始接触电子书,后来渐渐养成了看电子书的习惯.在阅读电子书的过程中自然要接触到各种各样的阅读类的手机app,比如书旗.qq阅读.百度阅读器等等.个人感觉掌阅使用起来好一些. 首先,它的界面很简 ...