当前位置: 代码迷 >> Oracle技术 >> ibatis的isEqual上不能有CDATA吗,小弟我这样做老是报错,求高手看看是咋回事呀
  详细解决方案

ibatis的isEqual上不能有CDATA吗,小弟我这样做老是报错,求高手看看是咋回事呀

热度:62   发布时间:2016-04-24 08:27:32.0
ibatis的isEqual下不能有CDATA吗,我这样做老是报错,求高手看看是怎么回事呀
sql语句配置:
XML code
<select id="queryJobProjiectCondition" remapResults="true" parameterClass="java.util.HashMap" resultClass="bean.JobProjiect">        select * from IPWF_LOCAL_JOB_PROJECT where 1=1        <isNotNull prepend="and" property="queryJobNumber">            JOB_NUMBER like '%'||#queryJobNumber#||'%'        </isNotNull>        <isNotNull prepend="and" property="queryJobContent">            JOB_CONTENT like '%'||#queryJobContent#||'%'        </isNotNull>        <isNotNull prepend="and" property="queryJobExecutorName">            JOB_EXECUTOR_NAME like '%'||#queryJobExecutorName#||'%'        </isNotNull>        <isNotEmpty prepend="and" property="queryJobCycle">            JOB_CYCLE = #queryJobCycle#        </isNotEmpty>        <isNotEmpty prepend="and" property="queryJobMode">            JOB_MODE = #queryJobMode#        </isNotEmpty>        <isEqual prepend="and" property="queryPeriodOfValidity" compareValue="yes">            <![CDATA[                JOB_STATRTIME <= sysdate and JOB_ENDTIME >= sysdate or JOB_ENDTIME = null             ]]>        < /isEqual>        <isEqual prepend="and" property="queryPeriodOfValidity" compareValue="no">            <![CDATA[                JOB_ENDTIME <= sysdate or JOB_ENDTIME = null             ]]>        < /isEqual>        ORDER  BY S_SEQ_ID DESC    </select>


出错的代码应该是在下面这段代码中,求高手给我看看是怎么回事
XML code
<isEqual prepend="and" property="queryPeriodOfValidity" compareValue="yes">            <![CDATA[                JOB_STATRTIME <= sysdate and JOB_ENDTIME >= sysdate or JOB_ENDTIME = null             ]]>        < /isEqual>        <isEqual prepend="and" property="queryPeriodOfValidity" compareValue="no">            <![CDATA[                JOB_ENDTIME <= sysdate or JOB_ENDTIME = null             ]]>        < /isEqual>


报错显示为:
Java code
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: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.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: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.Caused by: java.lang.RuntimeException: Error parsing XPath '/sqlMapConfig/sqlMap'.  Cause: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.Caused by: com.ibatis.common.xml.NodeletException: Error parsing XML.  Cause: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.Caused by: org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup.


在这上面耗了一天的时间了,求高手帮忙看看,我到底是哪里错了
  相关解决方案