Error parsing XPath '/sqlMapConfig/sqlMap' low-level error when using ibatis

When using ibatis, I encountered an error. caused by negligence, keep it for the record.
The error message is as follows:

RROR Plat.Ser: Error occurred.  Cause: 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/insert'.  Cause: java.lang.RuntimeException: Could not find SQL statement to include with refid 'Insert_column'
java.lang.RuntimeException: Error occurred.  Cause: 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/insert'.  Cause: java.lang.RuntimeException: Could not find SQL statement to include with refid 'Insert_column'
        at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:89)

 

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/insert'.  Cause: java.lang.RuntimeException: Could not find SQL statement to include with refid 'Insert_column'
        at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)
        at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser.parse(SqlMapConfigParser.java:86)
        ... 27 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/insert'.  Cause: java.lang.RuntimeException: Could not find SQL statement to include with refid 'Insert_column'
        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:51)
        ... 28 more
Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'.  Cause: java.lang.RuntimeException: Could not find SQL statement to include with refid 'Insert_column'
        at com.ibatis.common.xml.NodeletParser.parse(NodeletParser.java:53)
        at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser.parse(SqlMapParser.java:51)
        at com.ibatis.sqlmap.engine.builder.xml.SqlMapConfigParser$11.process(SqlMapConfigParser.java:410)
        at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
        ... 32 more
Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMap/insert'.  Cause: java.lang.RuntimeException: Could not find SQL statement to include with refid 'Insert_column'
        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:51)
        ... 35 more
Caused by: java.lang.RuntimeException: Could not find SQL statement to include with refid 'Insert_column'
        at com.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.parseDynamicTags(SqlStatementParser.java:255)
        at com.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.processSqlStatement(SqlStatementParser.java:204)
        at com.ibatis.sqlmap.engine.builder.xml.SqlStatementParser.parseGeneralStatement(SqlStatementParser.java:120)
        at com.ibatis.sqlmap.engine.builder.xml.SqlMapParser$19.process(SqlMapParser.java:563)
        at com.ibatis.common.xml.NodeletParser.processNodelet(NodeletParser.java:121)
        ... 39 more

 code show as below:

<insert id="Insert" parameterClass="uecpSplitOrder">
		insert into umpay.$tableName$(
			<include refid="Insert_column" />
		)
		values (
			<include refid="Insert_value" />
		)
</insert>
<sql id="Insert_column">
................................
</sql>
<sql id="Insert_value">
.................................
</sql>

 I believe that the wise people have already found the problem. That's right, the referrer is placed in front of the referee, and the refid object cannot be found when ibatis parses, resulting in an error.

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326361609&siteId=291194637