ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Warren <war...@clarksnutrition.com>
Subject Re: n+1 Problem NullPointerException
Date Tue, 05 Dec 2006 01:55:48 GMT
I tried changing the int properties to Integer and I am still getting 
the same exceptions. I guess it is time to give up. Thanks for everyones 
help.

Warren wrote:
> I will give it a try. I don't seem to have this problem with other 
> sqlMaps I am using. This is the first n+1 I have tried. Is this the 
> Exception that leads you to believe that it is a primitive mapping 
> problem:
>
> com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getPrimitiveResultMappingValue(BasicResultMap.java:268)

>
>
> Jeff Butler wrote:
>> Thanks for the stack trace.
>>  
>> I'll have to look into this a little further.  iBATIS is a little 
>> finicky when it comes to using primitive types.  You might have 
>> better luck if you changed to using Integer instead of int for the 
>> primary keys.
>>  
>> Jeff Butler
>>
>>  
>> On 12/1/06, *Warren* <warren@clarksnutrition.com 
>> <mailto:warren@clarksnutrition.com>> wrote:
>>
>>     Caused by: com.ibatis.dao.client.DaoException: Error executing
>>     query for
>>     list.  Cause: com.ibatis.common.jdbc.exception.NestedSQLException :
>>     --- The error occurred in
>>     
>> com/clarks/spanky/persistence/sqlmapdao/sql/postgres/batchOrder-postgres.xml. 
>>
>>
>>     --- The error occurred while applying a result map.
>>     --- Check the BatchOrder.catItemsResults.
>>     --- Check the result mapping for the 'items' property.
>>     --- Cause: java.lang.NullPointerException
>>     Caused by: java.lang.NullPointerException
>>     Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
>>     --- The error occurred in
>>     com/clarks/spanky/persistence/sqlmapdao/sql/postgres/batchOrder-
>>     postgres.xml.
>>
>>     --- The error occurred while applying a result map.
>>     --- Check the BatchOrder.catItemsResults.
>>     --- Check the result mapping for the 'items' property.
>>     --- Cause: java.lang.NullPointerException
>>     Caused by: java.lang.NullPointerException
>>        at
>>     
>> com.clarks.spanky.persistence.sqlmapdao.BaseSqlMapDao.executeQueryForList(BaseSqlMapDao.java:35)

>>
>>        at
>>     
>> com.clarks.spanky.persistence.sqlmapdao.BatchOrderSqlMapDao.getBatchedItemPromoPrices

>>
>>     (BatchOrderSqlMapDao.java:270)
>>        ... 34 more
>>     Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
>>     --- The error occurred in
>>     
>> com/clarks/spanky/persistence/sqlmapdao/sql/postgres/batchOrder-postgres.xml 
>>
>>     .
>>
>>     --- The error occurred while applying a result map.
>>     --- Check the BatchOrder.catItemsResults.
>>     --- Check the result mapping for the 'items' property.
>>     --- Cause: java.lang.NullPointerException
>>     Caused by: java.lang.NullPointerException
>>        at
>>     
>> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:155)

>>
>>        at
>>     
>> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForList 
>>
>>     (GeneralStatement.java:95)
>>        at
>>     
>> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java:247)

>>
>>        at
>>     
>> com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForList(SqlMapExecutorDelegate.java

>>
>>     :232)
>>        at
>>     
>> com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForList(SqlMapSessionImpl.java:71)

>>
>>        at
>>     
>> com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForList(SqlMapClientImpl.java:49)

>>
>>        at
>>     
>> com.clarks.spanky.persistence.sqlmapdao.BaseSqlMapDao.executeQueryForList 
>>
>>     (BaseSqlMapDao.java:32)
>>        ... 35 more
>>     Caused by: java.lang.NullPointerException
>>        at
>>     
>> com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getPrimitiveResultMappingValue(BasicResultMap.java:268)

>>
>>        at
>>     
>> com.ibatis.sqlmap.engine.mapping.result.BasicResultMap.getResults(BasicResultMap.java:107)

>>
>>        at
>>     
>> com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:274)

>>
>>        at
>>     com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery
>>     (SqlExecutor.java:125)
>>        at
>>     
>> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:172)

>>
>>        at
>>     
>> com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback

>>
>>     (GeneralStatement.java:139)
>>        ... 41 more
>>
>>
>>     Jeff Butler wrote:
>>     > Sorry for your frustration, but you'll have to tell us where the
>>     > NullPointerException is coming from.  Could you post a stack 
>> trace?
>>     >
>>     > Jeff Butler
>>     >
>>


Mime
View raw message