Ibatis "This SQL map does not contain a mappedstatement" error

Source: Internet
Author: User
Tags stack trace

This SQL map does not contain a mappedstatement named List

Description: An unhandled exception occurred during the execution of the current WEB request. Check the stack trace information For more information about the error and the source of the error in your code.

Exception Details: IBatisNet.DataMapper.Exceptions.DataMapperException:This SQL map does not contain a mappedstatement named Adminf.list

By this mistake for a few days, repeatedly check the configuration file and XML file, just do not check the error, and later notice 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, I am here admin, so when applied I put this sentence: return Mapper (). queryForList ("List", null), changed to return Mapper ().  queryForList ("admin.list", null); Incredibly can, no mistake, you can see some of the demo program, they do not need these to write Ah, to now also do not know how to do, people who know, please tell me, thank you!

(2014-9-1) Now understand, originally in the Sqlmap.config file, I set the Usestatementnamespaces = "true", the default is true, that is, using the Satement namespace, So when the application must be added to the namespace, this is good, because each table has select,update and other operations, so well-differentiated, and many of the demo example is to operate only a table, not specifically pointed out such a situation, so it caused their own such a mistake

Ibatis "This SQL map does not contain a mappedstatement" error

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.