Consequences of missing return types in MyBatis configuration file xxxx.xml A query was run and no Result Maps were found

Source: Internet
Author: User

An exception occurred while using MyBatis:

Like a mistake.

Error querying database. Cause:org.apache.ibatis.executor.executorexception:a query was run and no Result Maps were found for the Mapped statemen T

(Omitted in the following section)

Online says Oracle does not allow null values to be inserted.

But I did not do the insert operation, just made a query.

Then look at MyBatis's configuration file, missing an entry: Resulttype property value

The original configuration is: <select id= "COUNTSITEINV" parametertype= "Map" >

Modified configuration <select id= "COUNTSITEINV" resulttype= "Camelcasekeymap" parametertype= " Map" >

No matter what query in MyBatis, you must return the value of Resulttype or RESULTMAP, otherwise you will get an error.

Consequences of missing return types in MyBatis configuration file xxxx.xml A query was run and no Result Maps were found

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.