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.