Ibatis's & quot; This SQL map does not contain a MappedStatement & quot; error, ibatismap

Source: Internet
Author: User

Ibatis's "This SQL map does not contain a MappedStatement" error, ibatismap
This SQL map does not contain a MappedStatement named List

Note:An error occurred while executing the current Web request. Check the stack trace information for details about the error and the source of the error in the code.

Exception details:IBatisNet. DataMapper. Exceptions. DataMapperException: This SQL map does not contain a MappedStatement named Adminf. List

After several days of this error, I checked the configuration file and xml file repeatedly, but did not check the error. Later I noticed that the SQL configuration file has a namespace, <sqlMap namespace = "Admin" xmlns = "http://ibatis.apache.org/mapping"
Xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance">

For example, here I am Admin, so when I apply this sentence: return Mapper (). queryForList ("List", null); changed to return Mapper (). queryForList ("Admin. list ", null); actually yes, no error. You can read some demo programs. They don't need to write these statements. Now, I don't know what's going on, please let me know. Thank you!

(2014-9-1) Now I understand that it was originally in sqlmap. in the config file, I set useStatementNamespaces = "true". The default value is true, that is, the Satement namespace is used. Therefore, the namespace must be added during the application, because each table has select, update, and other operations, this is a good distinction, and many demo examples only operate on one table, not specifically pointed out such a situation, so it will cause such an error.


An error occurred while running the NET project.

An error occurred while executing the query object 'countnumber. GetById. Cause: this is because the SQL map does not contain the name CountNumber. GetById1 MappedStatement,
The error is:
 
An error occurs when ibatisnet calls the stored procedure. This SQL map does not contain a MappedStatement named IsUserNameExis

Sqlmap configuration error
 

Related Article

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.