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.RuntimeException: Error parsing XPath ‘/sqlMapConfig/sqlMap‘.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath ‘/sqlMap/select‘.  Cause: com.ibatis.sqlmap.client.SqlMapException: There is already a statement named search in this SqlMap.
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)

at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:86)

这个是因为没有启用命名空间,导致存在相同的SQL ID

解决方案如下:

<settings cacheModelsEnabled="true" enhancementEnabled="true"
        lazyLoadingEnabled="true" errorTracingEnabled="true" maxRequests="32"
        maxSessions="10" maxTransactions="5" useStatementNamespaces="true" />
时间: 2024-08-04 03:21:36

com.ibatis.sqlmap.client.SqlMapException: There is already a statement named search in this SqlMap.的相关文章

解决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.在xxx.xml文件中有两个标签的id命名相同: 2.DAO实现类方法中没有写对应xxx.xml的id名称: 3.实体映射文件xxx.xml未加入到sqlMap-Config.xml文件中. 解决com.ibatis.sqlmap.client.SqlMapException: There is no

org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;parentId&#39; in &#39;class java.lang.String&#39;

Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'parentId' in 'class java.lang.String' at org.apache.ibatis.reflection.Reflector.getGetInvoker(Reflector.java:333) at org.apache.ibatis.reflection.Meta

org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;fundId&#39; in &#39;class java.lang.Integer&#39;

Struts Problem Report Struts has detected an unhandled exception: Messages: There is no getter for property named 'fundId' in 'class java.lang.Integer' nested exception is org.apache.ibatis.reflection.ReflectionException: There is no getter for prope

Caused by: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;zoneId&#39; in &#39;class java.lang.String&#39;

本文为博主原创,未经允许不得而转载: 异常展示: dao层定义的接口为: public int getClientTotal(); 在mybatis中的sql为: <select id="getClientTotal" parameterType="String" resultType="Integer"> SELECT COUNT(*) AS oldNum FROM tbl__client_info <where> &l

mybatis之org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;time&#39; in &#39;class java.lang.String&#39;

mybatis接口 List<String> getUsedCate(String time); 配置文件 <select id="getUsedCate" parameterType="java.lang.String" resultType="java.lang.String"> select distinct(cate.cate_name) from account as acc left join conCateg

Error querying database. Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named &#39;ItemsCustom&#39; in &#39;class com.pojo.OrderDetailCustom

再用 junit 测试MyBatis时发现的错误: org.apache.ibatis.exceptions.PersistenceException: ### Error querying database.  Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'ItemsCustom' in 'class com.pojo.OrderDetailCust

(mac环境)Appium安装了client包,但是提示no module named appium

背景 mac环境,使用pip install Appium-Python-Client已经安装了client包 问题 import appium,提示no module named appium 解决方案 cd /usr/local/bin pip3 install Appium-Python-Client 如果安装时遇到了以下问题 You are using pip version 8.1.1, however version 8.1.2 is available. You should co

ibatis出错:There is no result map named RM.ProjectCharge in this SqlMap.

明明已有id=RM.ProjectCharge. 出错:Cause: com.ibatis.sqlmap.client.SqlMapException: There is no result map named RM.ProjectCharge in this SqlMap. 原因:RM.ProjectCharge的顺序放错 如: 修正:把id="RM.ProjectCharge.simple"放在id="RM.ProjectCharge"的下面就ok

iBatis之Iterator的使用

一:前言 现在这个项目使用的是iBatis,我刚刚开始的时候说是用MyBatis,因为我以前用过,觉得还是比较好用的啊,而且不像iBatis样,查什么一个字段不能多也不能少,觉得好无语啊. 二:内容 自己现在接触的iterator有如下两种用处 (一):批量循环插入 批量插入的话有可以分开说,一种是在后台代码中,批量插入,一种是在数据库中循环插入 (1):在先说后台批量插入的,直接上代码 return (Integer)this.getSqlMapClientTemplate().execute