MyBatis Invalid bound statement (not found) and Result Maps collection already contains value for ... Error resolution

Source: Internet
Author: User

I. Invalid bound statement (not found)

The use of MyBatis sometimes reported invalid bound statement (not found) This error, summarized below, there may be two cases are as follows:

The corresponding mapper.xml of 1.mybatis cannot find the corresponding named SQL or the name is inconsistent with the Mapper interface name.

The 2.xml file is the same as the interface name, but the configuration is missing from the MyBatis configuration file, and this error is reported.

Two. Result Maps collection already contains value for ...

A friend said, the MyBatis in the mappers attribute is removed, but, if the *mapper.xml file and mapper interface is not a package, is not removed, if there is no configuration in spring, then will be an error,

Sometimes the configuration is right, but still reported this mistake, and later did the experiment, will *mapper.xml file all deleted, rebuild the compilation, error, this is actually a strange problem, sometimes inevitably encounter.

MyBatis Invalid bound statement (not found) and Result Maps collection already contains value for ... Error resolution

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.