首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

failed; nested exception is org.springframework.core.NestedIOException:

2013-09-11 
ibatis错误 谁帮我看下 什么原因org.springframework.beans.factory.BeanCreationException: Error creati

ibatis错误 谁帮我看下 什么原因
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'chgReceivableBillDao' defined in file [D:\MyWork_GDZJ\prolims-aglaia\prolims-std-charge\target\classes\prolims-charge-dao.xml]: Cannot resolve reference to bean 'sqlMapClientCharge' while setting bean property 'sqlMapClient'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClientCharge' defined in file [D:\MyWork_GDZJ\prolims-aglaia\prolims-std-charge\target\classes\prolims-charge-ds.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [charge-sqlmap-config.xml]; nested exception is 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/sql'. Cause: com.ibatis.sqlmap.client.SqlMapException: Duplicate <sql>-include 'RECEIVABLE_BILL.getChgReceivableBillTable' found.

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'sqlMapClientCharge' defined in file [D:\MyWork_GDZJ\prolims-aglaia\prolims-std-charge\target\classes\prolims-charge-ds.xml]: Invocation of init method failed; nested exception is org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [charge-sqlmap-config.xml]; nested exception is 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/sql'. Cause: com.ibatis.sqlmap.client.SqlMapException: Duplicate <sql>-include 'RECEIVABLE_BILL.getChgReceivableBillTable' found.

Caused by: org.springframework.core.NestedIOException: Failed to parse config resource: class path resource [charge-sqlmap-config.xml]; nested exception is 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/sql'. Cause: com.ibatis.sqlmap.client.SqlMapException: Duplicate <sql>-include 'RECEIVABLE_BILL.getChgReceivableBillTable' found.

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/sql'. Cause: com.ibatis.sqlmap.client.SqlMapException: Duplicate <sql>-include 'RECEIVABLE_BILL.getChgReceivableBillTable' found.
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62)
at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:62)
at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:55)
at org.springframework.orm.ibatis.SqlMapClientFactoryBean.buildSqlMapClient(SqlMapClientFactoryBean.java:339)
... 48 more
Caused by: 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/sql'. Cause: com.ibatis.sqlmap.client.SqlMapException: Duplicate <sql>-include 'RECEIVABLE_BILL.getChgReceivableBillTable' found.
at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123)
at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84)
at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)


at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60)
... 51 more
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML. Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/sql'. Cause: com.ibatis.sqlmap.client.SqlMapException: Duplicate <sql>-include 'RECEIVABLE_BILL.getChgReceivableBillTable' found.
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:62)
at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser.parse(SqlMapParser.java:44)
at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$10.process(SqlMapConfigParser.java:257)
at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
... 55 more
Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMap/sql'. Cause: com.ibatis.sqlmap.client.SqlMapException: Duplicate <sql>-include 'RECEIVABLE_BILL.getChgReceivableBillTable' found.
at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:123)
at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:84)
at com.ibatis.common.xml.NodeletParser.process(NodeletParser.java:102)
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:72)
at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:60)
... 58 more
Caused by: com.ibatis.sqlmap.client.SqlMapException: Duplicate <sql>-include 'RECEIVABLE_BILL.getChgReceivableBillTable' found.
at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$2.process(SqlMapParser.java:65)
at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
... 62 more
哪位大虾看看啊


[解决办法]
我觉得问题应该是在ibatis的配置文件里
[解决办法]
Cannot resolve reference to bean 'sqlMapClientCharge' 

应该是你的配置文件有问题
[解决办法]
应该是在xml 配置中存在两个RECEIVABLE_BILL.getChgReceivableBillTable
[解决办法]
java.lang.RuntimeException: Error parsing XPath '/sqlMap/sql'. Cause: com.ibatis.sqlmap.client.SqlMapException: Duplicate <sql>-include 'RECEIVABLE_BILL.getChgReceivableBillTable' found.

配置文件里面
RECEIVABLE_BILL.getChgReceivableBillTable
sql配置错误。

热点排行