ibatis的there is no statement named xxx in this SqlMap
com.ibatis.sqlmap.client.SqlMapException: There is no statement named Control.insert-control in this SqlMap.
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.getMappedStatement(SqlMapExecutorDelegate.java:231)
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:367)
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82)
at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.insert(SqlMapClientImpl.java:58)
1. 你的sqlmap 文件中确实没有xxx这个statement ,很有可能某个字母写错了。
2. 实体映射文件未加入到sqlMap-Config.xml文件中。
原因是:框架只读取sqlMap-Config.xml文件,对新建的sqlMap引入文件即使注入bean也不予理睬。将引入文件加入sqlMap-Config.xml就可以解决问题。
把用到xml文件加到sqlMap-Config.xml中引入就可以了
2. sqlmap文件配置定义了使用namespace属性,useStatementNamespaces="true",此时在本文件中引用别的statement,就需要这样写:(你的namespace).(定义的statement 的id),如果把namespace属性漏了,就被报此异常。
ibatis的there is no statement named xxx in this SqlMap的更多相关文章
- com.ibatis.sqlmap.client.SqlMapException: There is already a statement named search in this SqlMap.
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeExcep ...
- 解决com.ibatis.sqlmap.client.SqlMapException: There is no statement named in this SqlMap
com.ibatis.sqlmap.client.SqlMapException: There is no statement named in this SqlMap. 可能存在3种情况: 1.在x ...
- org.apache.ibatis.reflection.ReflectionException: There is no getter for property named XXX 异常的解决办法。(亲测,一次成功!) #Mybatis
今天在用Mybatis的时,写测试验证插入操作时出现错误org.apache.ibatis.reflection.ReflectionException: There is no getter for ...
- mybatis使用时org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):的错误
最近在使用mybatis时,出现了 org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): 这 ...
- Mybatis报错: There is no getter for property named xxx
在mapper文件中函数的形参上加上注解. 例如: 出现了如下错误:核心错误提示就是There is no getter for property named xxx ### Error qu ...
- org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): da.huying.usermanag ...
- Exception:HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)
主要错误信息如下: HTTP Status 500 - org.apache.ibatis.binding.BindingException: Invalid bound statement (not ...
- 解决BeanNotOfRequiredTypeException: Bean named 'XXX' must be of type XXX, but was actually of type XXX问题
Java新手,困扰了一下午. 发布时总是报这样一个错误. org.springframework.beans.factory.BeanCreationException: Error creating ...
- python模块以及导入出现ImportError: No module named 'xxx'问题
python中,每个py文件被称之为模块,每个具有__init__.py文件的目录被称为包.只要模块或者包所在的目录在sys.path中,就可以使用import 模块或import 包来使用如果你要使 ...
随机推荐
- JavaScript学习笔记-数组(1)
数组是值的有序集合.每个值叫做一个元素,而每个元素在数组中有一个位置,以数字表示,称为索引.JavaScript数组是无类型的:数组元素可以是任意类型,并且同一个数组中的不同元素也可能有不同的类型.数 ...
- 【转】fread函数和fwrite函数
1.函数功能 用来读写一个数据块. 2.一般调用形式 fread(buffer,size,count,fp); fwrite(buffer,size,count,fp); 3.说明 ( ...
- Linux设备总线
kobject和kset是Linux设备模型中最基本的元素,其中,kset是同种类型kobject对象的集合.每个在内核中注册的kobject对象都对于sysfs文件系统中的一个目录.下面是自己花的一 ...
- 《RHEL6.3 FTP服务器虚拟用户的配置(含图)》——如此简单
虚拟用户就是传说中的ftp服务vip用户,大致分为这么几步: 1.安装ftp软件包 yum install *ftp* 2.启动vsftpd服务 /etc/init.d/vsftpd restart ...
- Eclipse中将项目导出jar包,以及转化成exe的方法
Eclipse中将项目导出jar包,以及转化成exe的方法 http://wenku.baidu.com/view/385597f07c1cfad6195fa7c6.html
- Android 核心组件 Activity 之下
创建新的Activity的方式: 1. 在相应的文件下 Ctrl + N (Eclipse, Android中不知道是不是) 2. 创建类,继承自Activity或者Activity的子孙类, 并在 ...
- DIV当textarea使用,在聚焦的时候将光标移动到内容的末尾
#### DIV当textarea使用,在聚焦的时候将光标移动到内容的末尾 #### <style type="text/css"> .test_box { width ...
- Jxl操作excel的demo
网上很多例子,都是用Jxl读或者写excel,本文实现的功能就是将数据源in.xls的第几行第几列数据写入到out.xls的第几行第几列,不覆盖out.xls其他原有的数据. 需要导入的包:jxl.j ...
- 简易记事本(演示java文件io)
演示效果: 打开txt文件 输入文字,保存 选择保存地址 生成文件 源代码: package io; import java.io.*; import java.awt.*; import ja ...
- 深入浅出话XAML-学习笔记
第一章 XAML是什么? 1.1XAML之前 *设计师的设计更不上程序逻辑的变化 *程序员未能完全实现设计师提供的效果图 *效果图与程序功能不能完全匹配 *从效果图到软件UI的转化耗费很多时间 1.2 ...