The content of element type "sqlMapConfig" is incomplete,

时间:2014-02-19 20:23:25   收藏:0   阅读:1799

The content of element type "sqlMapConfig" is incomplete, it must match "(properties?,settings?,resultObjectFactory?,typeAlias*,typeHandler*,transactionManager?,sqlMap+)+".   

 

xml如下:

bubuko.com,布布扣
<?xml version="1.0" encoding="GB2312" standalone="no"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
        "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
    <settings cacheModelsEnabled="false" enhancementEnabled="true" lazyLoadingEnabled="false" errorTracingEnabled="true"
              maxRequests="400" maxSessions="40"
              maxTransactions="32" useStatementNamespaces="true"/>
   

</sqlMapConfig>
bubuko.com,布布扣

 

原因是:sqlmap.xml中节点sqlMap 没有加上。

加上sqlmap即可。如下:

bubuko.com,布布扣
<?xml version="1.0" encoding="GB2312" standalone="no"?>
<!DOCTYPE sqlMapConfig PUBLIC "-//ibatis.apache.org//DTD SQL Map Config 2.0//EN"
        "http://ibatis.apache.org/dtd/sql-map-config-2.dtd">
<sqlMapConfig>
    <settings cacheModelsEnabled="false" enhancementEnabled="true" lazyLoadingEnabled="false" errorTracingEnabled="true"
              maxRequests="400" maxSessions="40"
              maxTransactions="32" useStatementNamespaces="true"/>

<sqlMap resource="conf/dal/sqlmap/aa.ibatis.xml"/> </sqlMapConfig>
bubuko.com,布布扣

原文:http://www.cnblogs.com/iusmile/p/3555343.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!