ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From keweiss <kevin.weis...@gmail.com>
Subject Exception being thrown when using HashMap
Date Wed, 26 Nov 2008 21:33:51 GMT

I'm currently getting an exception when attempting to pass in a HashMap as my
input parameterMap.  I can work around this situation temporarily by adding
to a POJO another field to hold the variable packageSet, but I'd rather not
because then it clutters up my object model.  I know this procedure works if
I use a POJO as my input, so I know it isn't the stored proc that is the
problem.

Here is the code:

HashMap map = new HashMap();
map.put("paymentPK", pay.getPaymentPK());
map.put("packageId",tckt.getCaseNum().getPackageSet());
map.put("spStatus", new Integer(0));

						
tempLst =
SqlMapConfig.getSqlMap().queryForList(MACSConstants.GET_DISBURSED_ATS_PAYMNT_AMT,
map);
DAOUtil.verifySPSuccess((Integer) map.get("spStatus"));

Here is the XML:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map 2.0//EN"
"http://www.ibatis.com/dtd/sql-map-2.dtd"> 
  
<sqlMap namespace="GetDisbursedATSPaymntAmts">
<parameterMap id="inMap" class="java.util.HashMap" >
    <parameter property="paymentPK" jdbcType="INTEGER" 
javaType="java.lang.Integer" mode="IN"/>
    <parameter property="packageId" jdbcType="CHAR"    
javaType="java.lang.String"  mode="IN"/>
    <parameter property="spStatus"  jdbcType="INTEGER" 
javaType="java.lang.Integer" mode="INOUT"/>
</parameterMap>
  
<resultMap id="outMap" class="nj.aoc.ito.macs.business.common.bo.Penalty">
    <result property="type"       columnIndex="1"/>
    <result property="code.key"   columnIndex="2"/>
    <result property="paid"       columnIndex="3"/>
    <result property="code.value" columnIndex="4"/>
</resultMap>
  
<procedure id="getDisbursedATSPaymntAmts" parameterMap="inMap"
resultMap="outMap">{call $dbSchema$.CMSP3064(?,?,?)}</procedure>
           
</sqlMap>

Exception:

[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R Caused by:
com.ibatis.common.jdbc.exception.NestedSQLException:   
--- The error occurred in storedProcedureMapping/CMSP3064.xml.  
--- The error occurred while applying a parameter map.  
--- Check the GetDisbursedATSPaymntAmts.atsDsbrsdPaymntIn.  
--- Check the statement (update procedure failed).  
--- Cause: com.ibm.db2.jcc.b.SqlException: THE STRING REPRESENTATION OF A
NAME IS INVALID
Caused by: com.ibm.db2.jcc.b.SqlException: THE STRING REPRESENTATION OF A
NAME IS INVALID
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:181)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:119)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:610)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:584)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:105)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:77)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
nj.aoc.ito.macs.business.dao.inquiry.PaymentDAO.readTrafficPaymentTable(PaymentDAO.java:139)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	... 91 more
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R Caused by:
com.ibm.db2.jcc.b.SqlException: THE STRING REPRESENTATION OF A NAME IS
INVALID
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibm.db2.jcc.b.zc.d(zc.java:1351)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibm.db2.jcc.a.db.l(db.java:366)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibm.db2.jcc.a.db.e(db.java:102)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibm.db2.jcc.a.r.e(r.java:72)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibm.db2.jcc.a.sb.i(sb.java:194)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibm.db2.jcc.b.zc.q(zc.java:1319)
[11/26/08 16:30:45:293 EST] 0000003e SystemErr     R 	at
com.ibm.db2.jcc.b.ad.d(ad.java:2281)
[11/26/08 16:30:45:309 EST] 0000003e SystemErr     R 	at
com.ibm.db2.jcc.b.bd.sb(bd.java:159)
[11/26/08 16:30:45:309 EST] 0000003e SystemErr     R 	at
com.ibm.db2.jcc.b.bd.execute(bd.java:142)
[11/26/08 16:30:45:309 EST] 0000003e SystemErr     R 	at
com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.pmiExecute(WSJdbcPreparedStatement.java:655)
[11/26/08 16:30:45:309 EST] 0000003e SystemErr     R 	at
com.ibm.ws.rsadapter.jdbc.WSJdbcPreparedStatement.execute(WSJdbcPreparedStatement.java:432)
[11/26/08 16:30:45:309 EST] 0000003e SystemErr     R 	at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQueryProcedure(SqlExecutor.java:287)
[11/26/08 16:30:45:309 EST] 0000003e SystemErr     R 	at
com.ibatis.sqlmap.engine.mapping.statement.ProcedureStatement.sqlExecuteQuery(ProcedureStatement.java:34)
[11/26/08 16:30:45:309 EST] 0000003e SystemErr     R 	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:169)
[11/26/08 16:30:45:309 EST] 0000003e SystemErr     R 	... 97 more


Any help is appreciated.

Thanks,

Kevin
-- 
View this message in context: http://www.nabble.com/Exception-being-thrown-when-using-HashMap-tp20709380p20709380.html
Sent from the iBATIS - User - Java mailing list archive at Nabble.com.


Mime
View raw message