ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Larry Meadors" <lmead...@apache.org>
Subject Re: java.lang.IllegalArgumentException
Date Thu, 13 Apr 2006 14:12:23 GMT
Just curious: why are you using int instead of Integer?

Larry


On 4/13/06, Tom.Stroobants@persgroep.be <Tom.Stroobants@persgroep.be> wrote:
>
>
> This is possble yes ...
> I will try to replace my int with a wrapper class.
>
> Is there an option in IBATIS that can be used to to the casting automatically ? In the
result resultmap ?
>
> Thanks !
>
>
>
>
>  "I Gede Putu Sutarsa Giri Putra" <IGede.Sutarsa@vico.co.id>
>
> 13/04/2006 11:20
>
> Please respond to
>
>  user-java@ibatis.apache.org
>
>
>
> To
> <user-java@ibatis.apache.org>
>
>
> cc
>
>
> Subject RE: java.lang.IllegalArgumentException
>
>
>
>
>
>
>
>
> Can you send the domain class.
> I guest there is a problem with your result class. Is the is primitive (i.e. int, long
, char) type as the field in that class . If there is primitive type then try to replace it
with the wrapper. Java.lang.Integer or java.lang.Long.
>
>
>
>  ________________________________

> From: Tom.Stroobants@persgroep.be [mailto:Tom.Stroobants@persgroep.be]
>  Sent: Thursday, April 13, 2006 4:13 PM
>  To: user-java@ibatis.apache.org
>  Subject: java.lang.IllegalArgumentException
>
>
>  Dear all,
>
>  I get on exception when using IBATIS on on Oracle database.
>  I have a table with some fields in it. One of the fields is a number field that can
contain NULL values.
>
>  I have defined a resultmap with the correct properties tags and also a valid result
tag that stored its values in the resultmap.
>
>  When selecting records where the number field is filled in there is no problem, when
selecting records where the number fields (which can contain NULL values !!) is NULL I get
the following exception:
>
>  500 Servlet Exception
>  java.lang.IllegalArgumentException
>                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>                  at java.lang.reflect.Method.invoke(Method.java:585)
>                  at com.ibatis.sqlmap.engine.accessplan.PropertyAccessPlan.setProperties(PropertyAccessPlan.java:45)
>                  at com.ibatis.sqlmap.engine.exchange.JavaBeanDataExchange.setData(JavaBeanDataExchange.java:112)
>                  at com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.setResultObjectValues(BasicResultMap.java:346)
>                  at com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback.handleResultObject(RowHandlerCallback.java:63)
>                  at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:395)
>                  at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:185)
>                  at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)
>                  at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
>                  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 org.springframework.orm.ibatis.SqlMapClientTemplate$3.doInSqlMapClient(SqlMapClientTemplate.java:245)
>                  at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:181)
>                  at org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:204)
>                  at org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:243)
>                  at be.persgroep.prj.hln.common.regio.dao.ibatis.ReactieDAO.getAllReacties(ReactieDAO.java:21)
>                  at _jsp._regio._regiotest__jsp._jspService(regio/regioTest.jsp:26)
>                  at com.caucho.jsp.JavaPage.service(JavaPage.java:60)
>                  at com.caucho.jsp.Page.pageservice(Page.java:570)
>                  at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:159)
>                  at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:178)
>                  at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:229)
>                  at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:267)
>                  at com.caucho.server.port.TcpConnection.run(TcpConnection.java:388)
>                  at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:490)
>                  at com.caucho.util.ThreadPool.run(ThreadPool.java:423)
>                  at java.lang.Thread.run(Thread.java:595)
>

Mime
View raw message