ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Prashanth Sukumaran <prashanthsukuma...@yahoo.com>
Subject ProbeException: Error getting ordinal list from JavaBean
Date Fri, 23 Sep 2005 15:32:29 GMT
Hi,
I am getting a ProbeException when using an iterate tag in sql maps over a list of string
objects.
 
Why does this throw an error when the data is a String.  Also why is IBatis trying to convert
it to an Integer. 
 
I have another query working the same when the List of String is in a Bean.  The only difference
i see is here the list is in a Map. 
 
Please note that i am just testing the functionality to work for the List.  Later i will pass
a List of invoiceNum to this method.
 
 public InvoiceDetailBean getInvoiceDetail(String invoiceNum) throws SystemException {
  Map map = new HashMap();
  List invoiceNumList = new ArrayList();
  invoiceNumList.add(invoiceNum);
  map.put("invoiceNum", invoiceNumList);
  List list = null;
  try {
      list = queryForList("getInvoiceDetail", map);
  } catch (DaoException de) {
   //  throw the exception about transaction failed
   throw new SystemException(de,
     "Unable to retrieve Invoice Detail for "+invoiceNum);
  } 
  return list;
 }


<iterate open="(" close=")" conjunction="OR" property="invoiceNum">

SLS_HDR.BILL_DOC_NUM = #invoiceNum[]#

</iterate>

 

BILL_DOC_NUM in the bean is defined as String and in the SLS_HDR is a VARCHAR2

 
I am using IBatis version 2.1.5 build 582 against Oracle database.
 
Thanks
Prashanth.
 
 

2005-09-15 17:45:25,210   DEBUG   java.sql.Connection - {conn-100006} Connection
2005-09-15 17:45:25,240   ERROR   com.wirelessmob.onlineinvoice.action.InvoiceDetailAction
- Search Failed
com.wirelessmob.onlineinvoice.businesslogic.services.InvoiceException: Unable to retrieve
Invoice Detail for [0092404226]: Unabl
e to retrieve Invoice Detail for [0092404226]: Failed to queryForList - id [getInvoiceDetail],
parameterObject [{invoice
NumList=[0092404226]}].  Cause: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/wirelessmob/onlineinvoice/dataaccess/persistence/sqlmapdao/sql/detailInvoice.xml.
--- The error occurred while preparing the mapped statement for execution.
--- Check the getInvoiceDetail.
--- Check the parameter map.
--- Cause: com.ibatis.common.beans.ProbeException: Error getting ordinal list from JavaBean.
Cause java.lang.NumberForma
tException: For input string: ""
Caused by: java.lang.NumberFormatException: For input string: ""
Caused by: com.ibatis.common.beans.ProbeException: Error getting ordinal list from JavaBean.
Cause java.lang.NumberForma
tException: For input string: ""
Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in com/wirelessmob/onlineinvoice/dataaccess/persistence/sqlmapdao/sql/detailInvoice.xml.
--- The error occurred while preparing the mapped statement for execution.
--- Check the getInvoiceDetail.
--- Check the parameter map.
--- Cause: com.ibatis.common.beans.ProbeException: Error getting ordinal list from JavaBean.
Cause java.lang.NumberForma
tException: For input string: ""
Caused by: java.lang.NumberFormatException: For input string: ""
        at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:18
8)
        at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList(GeneralStatement.java:123)
        at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:610)
        at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:584)
        at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:101)
        at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:78)
        at com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForList(SqlMapDaoTemplate.java:203)
        ... 49 more
Caused by: com.ibatis.common.beans.ProbeException: Error getting ordinal list from JavaBean.
Cause java.lang.NumberForma
tException: For input string: ""
Caused by: java.lang.NumberFormatException: For input string: ""
        at com.ibatis.common.beans.BaseProbe.getIndexedProperty(BaseProbe.java:80)
        at com.ibatis.common.beans.ComplexBeanProbe.getProperty(ComplexBeanProbe.java:297)
        at com.ibatis.common.beans.ComplexBeanProbe.getObject(ComplexBeanProbe.java:197)
        at com.ibatis.common.beans.GenericProbe.getObject(GenericProbe.java:57)
        at com.ibatis.sqlmap.engine.exchange.ComplexDataExchange.getData(ComplexDataExchange.java:65)
        at com.ibatis.sqlmap.engine.mapping.parameter.BasicParameterMap.getParameterObjectValues(BasicParameterMap.java:
132)
        at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:16
5)
        ... 55 more
Caused by: java.lang.NumberFormatException: For input string: ""
        at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
        at java.lang.Integer.parseInt(Integer.java:468)
        at java.lang.Integer.parseInt(Integer.java:497)
        at com.ibatis.common.beans.BaseProbe.getIndexedProperty(BaseProbe.java:51)
        ... 61 more

 

		
---------------------------------
Yahoo! for Good
 Click here to donate to the Hurricane Katrina relief effort. 
Mime
View raw message