Jeff,

I think you were write about the older version. I had quite a lot of them sitting around. I have since deleted them and cleaned up my classpath, but in the process it has broken my code. So, I can not test whether that was the problem or not write at this time. I am in the process of fixing things using the latest version, but it is probably safe to say the older versions were messing things up. Sorry about all the shadow chasing, I appreciate the help everyone has given me. This is truly one of the more helpful mailing lists I have used.

Clinton Begin wrote:
Once you guys have figured out whether it's a primitive mapping problem and the correct stack trace/line numbers...let me know. If it is an iBATIS problem, I'll give you a hand looking for the issue. The N+1 stuff is a bit tough to navigate. I am always embarassed when an NPE is thrown...there's no good excuse for it. So I really hope its not the iBATIS code. ;-)

Regards,
Clinton


On 12/4/06, * Jeff Butler* <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote:

    Something is very odd.  The line numbers in the stack trace are
    nowhere near the current line numbers - I had to go back over 2
    years to find a match.  So I think part of the problem is that
    there is a really old version of iBATIS somewhere in your classpath.
Please make sure that you are using a current version of iBATIS,
    and that all old version are removed from the classpath.  That
    should help a lot!
Jeff Butler


On 12/4/06, *Warren* <[EMAIL PROTECTED]
    <mailto:[EMAIL PROTECTED]>> wrote:

        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* < [EMAIL PROTECTED]
        <mailto:[EMAIL PROTECTED]>
        >> <mailto: [EMAIL PROTECTED]
        <mailto:[EMAIL PROTECTED]>>> 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
        >>     >
        >>




Reply via email to