ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cuong PN <pncuon...@yahoo.com>
Subject InlineParameterMap exception
Date Thu, 23 Aug 2007 06:14:50 GMT

Hi all

Here's an exception that I got while using SQLMaps:

com.ibatis.dao.client.DaoException: Failed to queryForList - id [someid],
parameterObject [someobject@f026c0].  Cause:
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred while applying a parameter map.
--- Check the someid-InlineParameterMap.
--- Check the parameter mapping for the 'paidI' property.
--- Cause: java.sql.SQLException: Invalid column type
Caused by: java.sql.SQLException: Invalid column type
        at
com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForList(SqlMapDaoTemplate.java:284)
        at
com.sums.implementation.SumsDaoImpl.getDetails(SumsDaoImpl.java:40)
        at sun.reflect.GeneratedMethodAccessor277.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:324)
        at com.ibatis.dao.engine.impl.DaoProxy.invoke(DaoProxy.java:72)
        at $Proxy17.getDetails(Unknown Source)
        ...

And here's the xml (some data obmitted):

<select id="..." resultMap="..." parameterClass="...">
select * from atable
where
((#acptI# IS NULL OR (#acptI# IS NOT NULL AND ACPT_I = #acptI#) OR (#acptI#
IS NOT NULL AND #acptI# = 'N' AND ACPT_I IS NULL)) 
AND  (#paidI# IS NULL OR (#paidI# IS NOT NULL AND PAID_I = #paidI#) OR
(#paidI# IS NOT NULL AND #paidI# = 'N' AND PAID_I IS NULL)))
	<isNotNull prepend = "and" property = "shftDt">
		SHFT_DT <![CDATA[>=]]>#shftDt:VARCHAR#
	</isNotNull>
	<isNotNull prepend = "and" property = "shftDtTo">
		SHFT_DT <![CDATA[<=]]>#shftDtTo:VARCHAR#
	</isNotNull>
  				     
      <isNotEmpty prepend = "and" property = "jobId"> JOB_ID=#jobId#
</isNotEmpty>
      <isNotEmpty prepend = "and" property = "acptId">
ACPT_ID=#acptId:VARCHAR# </isNotEmpty>
      <isNotEmpty prepend = "and" property = "acptDt">
ACPT_DT=#acptDt:VARCHAR# </isNotEmpty>
      <isNotEmpty prepend = "and" property = "apprId">
APPR_ID=#apprId:VARCHAR#  </isNotEmpty>
      <isNotEmpty prepend = "and" property = "apprDt">
APPR_DT=#apprDt:VARCHAR# </isNotEmpty>
      <isNotEmpty prepend = "and" property = "disputeI">
DISPUTE_I=#disputeI:VARCHAR# </isNotEmpty>
      <isNotEmpty prepend = "and" property = "usrId"> USR_ID=#usrId#
</isNotEmpty>
    </select>


The interesting thing is that it runs fine on one server, but on another it
throws such exception. Any help? Thanks so much!
cuong
-- 
View this message in context: http://www.nabble.com/InlineParameterMap-exception-tf4315664.html#a12288081
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message