码迷,mamicode.com
首页 > 数据库 > 详细

com.ibatis.sqlmap.client.SqlMapException: There is already a statement named search in this SqlMap.

时间:2014-08-25 14:35:24      阅读:370      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   java   io   strong   ar   div   cti   

 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" />

 

com.ibatis.sqlmap.client.SqlMapException: There is already a statement named search in this SqlMap.

标签:style   blog   color   java   io   strong   ar   div   cti   

原文地址:http://www.cnblogs.com/fangyh/p/3934797.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!