这样的配置有问题吗?

<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的更多相关文章

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

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

  3. 【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 ...

  4. org.apache.ibatis.builder.IncompleteElementException: Could not find result map com.abc.beans.Minister

    使用mybatis进行一对多嵌套查询时出错,错误原因: <select id="findMinisterById" resultMap="com.abc.beans ...

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

  6. MyBatis的mapper.xml文件的参数问题:org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map

    配置参数类型有两种选择,即:parameterType和parameterMap 不管参数是否是基本数据类型还是map类型,都是使用parameterType. 版权声明:本文为博主原创文章,未经博主 ...

  7. org.apache.ibatis.builder.IncompleteElementException: Could not find parameter map

    mybatis 出现这个错误是 参数类型写错了.parameterType 写成了parameterMap

  8. Mybatis报错:org.apache.ibatis.builder.IncompleteElementException

    org.apache.ibatis.builder.IncompleteElementException: Could not find result map java.lang.Integer遇到这 ...

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

随机推荐

  1. Java集合类框架的最佳实践有哪些?

    1.根据应用需要正确选择要使用的集合类型对性能非常重要,比如:假如知道元素的大小是固定的,那么选用Array类型而不是ArrayList类型更为合适. 2.有些集合类型允许指定初始容量.因此,如果我们 ...

  2. match和search的区别

    正则表达式帮助你方便的检查一个字符串是否与某种模式匹配. re模块使Python语言拥有全部的正则表达式功能. re.match尝试从字符串的起始位置匹配一个模式,如果不是起始位置匹配成功的话,mat ...

  3. xslfo和fop使用中的一些问题

    最近项目中使用fop和xslfo打印pdf,遇到一些问题记录下来: 1.表格跨行.跨列: 使用number-rows-spanned和number-columns-spanned属性 比如:<f ...

  4. sublime text 使用小技巧

    sublime下载各个版本 官网 插件官方网站地址 https://packagecontrol.io/ 一.安装设置字体及字体大小 1.点菜单“Preferences--->Setting - ...

  5. thinkPHP 分页样式增加下拉列表

    $linkPage="  <select name='sldd' style='width:40px;height:30px;border:1px red block;' onchan ...

  6. vs2017 使用Bower 抛出异常ECMDERR Failed to execute "git ls-remote --tags --heads

    今天在使用Bower来下载vue包的时候,发现无法正常价新型,并且在输出窗口有以下提示 ECMDERR Failed to execute "git ls-remote --tags --h ...

  7. 通过位运算求两个数的和(求解leetcode:371. Sum of Two Integers)

    昨天在leetcode做题的时候做到了371,原题是这样的: 371. Sum of Two Integers Calculate the sum of two integers a and b, b ...

  8. #20175120彭宇辰 java第五周学习总结

    第六章 接口与实现 教材学习内容总结 接口-接口声名interace -接口体1.只有常量声明和抽象方法2.所有常量和方法的访问权限都为public3.常量都为static常量4.可省略pulic\s ...

  9. hdu5000 Clone dp+大数

    After eating food from Chernobyl, DRD got a super power: he could clone himself right now! He used t ...

  10. php 多线程

    windows下安装php真正的多线程扩展pthreads教程 http://www.thinkphp.cn/topic/22676.html PHP 安装 Pthreads (解决 class Th ...