MyBatis Anomaly: Analysis and resolution of the problem of could not find results map Java.util.Map

Source: Internet
Author: User

MyBatis Anomaly: Analysis and resolution of the problem of could not find results map Java.util.Map

Wrong wording
<select id= "Queryxxxcount" resultmap= "Java.util.Map" >

Exception Log reported by MyBatis:
Org.apache.ibatis.builder.IncompleteElementException:Could not find result map java.util.Map
At Org.apache.ibatis.builder.MapperBuilderAssistant.setStatementResultMap (mapperbuilderassistant.java:354) ~[ mybatis-3.1.1.jar:3.1.1]
At Org.apache.ibatis.builder.MapperBuilderAssistant.addMappedStatement (mapperbuilderassistant.java:292) ~[ mybatis-3.1.1.jar:3.1.1]
At Org.apache.ibatis.builder.xml.XMLStatementBuilder.parseStatementNode (xmlstatementbuilder.java:113) ~[ mybatis-3.1.1.jar:3.1.1]
At Org.apache.ibatis.session.Configuration.buildAllStatements (configuration.java:579) ~[mybatis-3.1.1.jar:3.1.1]
At Org.apache.ibatis.session.Configuration.getMappedStatement (configuration.java:505) ~[mybatis-3.1.1.jar:3.1.1]
At Org.apache.ibatis.session.Configuration.getMappedStatement (configuration.java:500) ~[mybatis-3.1.1.jar:3.1.1]
At Org.apache.ibatis.binding.MapperMethod.setupCommandType (mappermethod.java:240) ~[mybatis-3.1.1.jar:3.1.1]
At Org.apache.ibatis.binding.mappermethod.<init> (mappermethod.java:71) ~[mybatis-3.1.1.jar:3.1.1]
At Org.apache.ibatis.binding.MapperProxy.invoke (mapperproxy.java:39) ~[mybatis-3.1.1.jar:3.1.1]
。。。


Correct wording:
<select id= "Queryxxxcount" resulttype= "Java.util.Map" >


Attention:
MyBatis reported abnormal log stack information positioning is not so accurate (find where the error occurred can not directly according to the exception stack information directly located to the problem method)
This is based on the exception stack information found is the normal method, but triggered the problem of the MyBatis

In the problem debugging, search process: According to the SVN submission of the newly submitted code to check, comment out, and the actual debugging to accurately locate such problems.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.