ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ashish Kulkarni" <ashish.kulkarn...@gmail.com>
Subject Re: How to handle null in database
Date Mon, 19 May 2008 18:15:38 GMT
Hi
I changed Hashtable to HashMap and now it works,


On 5/19/08, Ashish Kulkarni <ashish.kulkarni13@gmail.com> wrote:
>
> Hi
> I am running following query
> <select id="getPDFInfo" resultClass="java.util.Hashtable"
> parameterClass="java.lang.String">
> Select * from Document_Version where UIC_Identity =#value# and PDF_Current
> = 1
> order by Version, Minor_Version
> </select>
>
> There is column in this database
> called Reprocessing_Scan_Date_Time, which has null values,
> when i do
> sqlMapClient.queryForList("getPDFInfo","item");
> I get following error, how do i handle this situation
>
> Caused by: com.ibatis.common.beans.ProbeException: Could not set property
> 'Reprocessing_Scan_Date_Time' for java.util.Hashtable. Cause:
> java.lang.NullPointerException
> at
> com.ibatis.common.beans.ComplexBeanProbe.setProperty(ComplexBeanProbe.java:355)
> at
> com.ibatis.common.beans.ComplexBeanProbe.setObject(ComplexBeanProbe.java:235)
> at com.ibatis.common.beans.GenericProbe.setObject(GenericProbe.java:90)
> at
> com.ibatis.sqlmap.engine.exchange.ComplexDataExchange.setData(ComplexDataExchange.java:87)
> at
> com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.setResultObjectValues(BasicResultMap.java:373)
> at
> com.ibatis.sqlmap.engine.mapping.statement.RowHandlerCallback.handleResultObject(RowHandlerCallback.java:64)
> at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:382)
> at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:301)
> at
> com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:190)
> at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)
> at
> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
>
>
>
>
>
>
>

Mime
View raw message