MyBatis Error: Result Maps collection already contains value for NOVEL.STORAGE.MAPPER.NOVELMAPPER.BASERESULTMAP

Source: Internet
Author: User

Today, when writing a project, I encountered a problem as follows:

Org.apache.ibatis.exceptions.PersistenceException:
# # # Error Building sqlsession.
# # # The error may exist in Novelmapper.xml
# # # The error occurred while processing Mapper_resultmap[baseresultmap]
# # # Cause:org.apache.ibatis.builder.BuilderException:Error parsing SQL Mapper Configuration. Cause:org.apache.ibatis.builder.BuilderException:Error parsing Mapper XML. Cause:java.lang.IllegalArgumentException:Result Maps Collection already contains value for Novel.storage.mapper.NovelMapper.BaseResultMap

Cause analysis

When the mybatis-generator is generated, it will append the same content to the original XML and cause the content to be duplicated in the Mapper.xml file. Error!

So find MyBatis automatically generated files are all deleted, re-build can be.

Then regenerate it again!

Thanks for the mistake!

MyBatis Error: Result Maps collection already contains value for NOVEL.STORAGE.MAPPER.NOVELMAPPER.BASERESULTMAP

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.