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 包来使用如果你要使 ...
随机推荐
- (转)Single Instance Form in a MDI application
private void OpenForm<T>() where T : Form, new() { T frm = (T)new List<Form>(this.MdiChi ...
- button按钮在IE6、7、8、9、10中处理方式并不相同[转]
http://msdn.microsoft.com/en-us/library/ms534696%28v=vs.85%29.aspx 转自:http://my.oschina.net/fz04003/ ...
- 【转】Linux网络编程入门
(一)Linux网络编程--网络知识介绍 Linux网络编程--网络知识介绍客户端和服务端 网络程序和普通的程序有一个最大的区别是网络程序是由两个部分组成的--客户端和服务器端. 客户 ...
- hibernate的id生成策略
欢迎转载,请注明出处http://www.cnblogs.com/shizhongtao/p/3436523.html 一.xml配置方式的id生成 <id name="id" ...
- myeclipse与数据库进行连接(无需写代码进行验证)
首先对SqlServer配置管理器进行设置. 1.打开SqlServer配置管理器 2.进入SQL配置管理器后,选中左侧“SQL Server网络配置”>>再选中“MSSQLSERVER的 ...
- Ubuntu 下 glpk 的安装及使用
作者:jostree 转载请注明出处 http://www.cnblogs.com/jostree/p/4156204.html glpk是一个开源的求解线性规划的包. 添加源: deb http:/ ...
- Ubuntu 14.04下java开发环境的搭建--2--Eclipse的安装
前面说了JDK的安装,http://www.cnblogs.com/bcsflilong/p/4196536.html 下面我们来安装Eclipse! 安装Eclipse 的前提是,你的JDK已经安装 ...
- ios学习:页面跳转(present)
// // TWFXSecondViewController.m // DemoMultiView // // Created by Lion User on 12-12-24. // Copyrig ...
- 操作xml文档的常用方式
1.操作XML文档的两种常用方式: 1)使用XmlReader类和XmlWriter类操作 XmlReader是基于数据流的,占用极少的内存,是只读方式的,所以速度极快.只能采用遍历的模式查找数据节点 ...
- ECshop sina
http://blog.sina.com.cn/s/blog_5327408801019ofa.html http://blog.sina.com.cn/u/2624360105 http://blo ...