ibatis - Exception with rownum in mybatis -
following sql query used in mybatis mapper xml.
<select id="getdata" fetchsize="30" resulttype="java.util.hashmap" > select * table module='ab' , rownum < 15 </select>
i getting below exception while using rownum :
error parsing sql mapper configuration. cause: org.apache.ibatis.builder.builderexception: error creating document instance. cause: org.xml.sax.saxparseexception; linenumber: 130; columnnumber: 16; content of elements must consist of well-formed character data or markup.
below things have tried:
rownum<=15 , <![cdata[ rownum <= 15 ]]>
but still not working.
try this:
<select id="getdata" fetchsize="30" resulttype="java.util.hashmap" > select * table module='ab' <![cdata[ , rownum <= 15 ]]> </select>
or rownum <= 15
(with whitespaces after rownum
, before 15).
Comments
Post a Comment