ibatis Could not find SQL statement to include with refid 'xxx' 问题
2013-11-27 13:48
603 查看
ibatis启动报错:
Could not find SQL statement to include with refid 'xxx'。
网上找的资料都是名称空间的问题,后来试着将这个被引用的sql片段放到使用它的sql前面,就可以了。
这可能是一个bug吧,使用的时候注意就是了。
注意:按照上面的配置好后,在Sql-Map-Config.xml中需要设置useStatementNamespaces="false",要不然启动也会报错。
我的Sql-Map-Config.xml配置如下:
<?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE sqlMapConfig
PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
< sqlMapConfig>
<settings
cacheModelsEnabled="false"
enhancementEnabled="false"
lazyLoadingEnabled="false"
maxRequests="3000"
maxSessions="3000"
maxTransactions="3000"
useStatementNamespaces="false"
/>
<sqlMap resource="com/xdd/po/User.xml" />
< /sqlMapConfig>
Could not find SQL statement to include with refid 'xxx'。
网上找的资料都是名称空间的问题,后来试着将这个被引用的sql片段放到使用它的sql前面,就可以了。
这可能是一个bug吧,使用的时候注意就是了。
注意:按照上面的配置好后,在Sql-Map-Config.xml中需要设置useStatementNamespaces="false",要不然启动也会报错。
我的Sql-Map-Config.xml配置如下:
<?xml version="1.0" encoding="UTF-8"?>
< !DOCTYPE sqlMapConfig
PUBLIC "-//iBATIS.com//DTD SQL Map Config 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-config-2.dtd">
< sqlMapConfig>
<settings
cacheModelsEnabled="false"
enhancementEnabled="false"
lazyLoadingEnabled="false"
maxRequests="3000"
maxSessions="3000"
maxTransactions="3000"
useStatementNamespaces="false"
/>
<sqlMap resource="com/xdd/po/User.xml" />
< /sqlMapConfig>
相关文章推荐
- ibatis Could not find SQL statement to include with refid 'xxx' 问题
- ibatis Could not find SQL statement to include with refid 'xxx' 问题
- ibatis Could not find SQL statement to include with refid 'xxx' 问题。
- Could not find SQL statement to include with refid :XXX这样的问题
- Sybase- Could not find SQL statement to include with refid 'getOrderInHdStatisDetailsql'
- Sybase- Could not find SQL statement to include with refid 'getOrderInHdStatisDetailsql'
- MyBatis3: Could not find SQL statement to include with refid ‘
- 升级Rails3.0后出现这样的问题。Could not find gem 'mysql2 ....
- 关于Sqlite3报错:Could not decode to UTF-8 column 'Name' with text...
- INFO: solr home defaulted to 'solr/' (could not find system property or JNDI)
- 解决 “Could not find class 'com.goole.zxing.Result”和“Multiple dex files define”问题
- java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect
- SparkSQL错误:Could not find uri with key [dfs.encryption.key.provider.uri] to create a keyProvider
- java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect
- DomainU Fails to boot with "Error: Device 0 (vif) could not be connected. Could not find bridge, and none was specified"
- java.sql.SQLException: null, message from server: "Host 'xxx' is not allowed to connect
- reason: 'Could not load NIB in bundle: "XXXXXXX" with name 'xxCell'
- 如何解决 X-code5.0中的iOS7.0SDK运行程序时,出现的以下问题:“Could not find a storyboard named 'Main' in bundle NSBundle”
- 'filename.h' file not found with <angled> include, use "quotes" instead. 问题详解
- ORA-12516, TNS: listener could not find available handler with matching protocol stack'