ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From leonard.reinst...@jpmorgan.com
Subject Getting NullPointer exception in SqlMapDaoTemplate
Date Fri, 21 Jul 2006 14:40:51 GMT
I am getting a NullPointer Exception when trying to update in Oracle. It
only happens sporadically. I.e., it may work several times in a row, then
it would fail once and then it would work again. We looked at the code and
cannot understand why this is happening. And the line in the Ibatis source
code where the exception occurs does not explain anything. Any ideas?

7/21/06 9:20:32:328 EDT] 7e00de6b SystemErr     R     at
com.ibatis.dao.client.template.SqlMapDaoTemplate.update(SqlMapDaoTemplate.java:124)
Caused by:
[7/21/06 9:20:32:359 EDT] 7e00de6b SystemErr     R
com.ibatis.common.jdbc.exception.NestedSQLException:
--- The error occurred in
com/tool/trans/proj/mytool/persistence/sqlmapdao/sql/Account.xml.
--- The error occurred while executing mapped statement.
--- Check the updateUserSubmit.
--- Check the statement or the result map.
--- Cause: java.lang.NullPointerException
Caused by: java.lang.NullPointerException
[7/21/06 9:20:32:359 EDT] 7e00de6b SystemErr     R    at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:94)
[7/21/06 9:20:32:359 EDT] 7e00de6b SystemErr     R    at
com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.update(SqlMapExecutorDelegate.java:500)
[7/21/06 9:20:32:359 EDT] 7e00de6b SystemErr     R    at
com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.update(SqlMapSessionImpl.java:85)
[7/21/06 9:20:32:359 EDT] 7e00de6b SystemErr     R    at
com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.update(SqlMapClientImpl.java:62)

The mapping is
      <parameterMap id="userSubmit" class="user">
            <parameter property="submitted"                 jdbcType=
"VARCHAR"         javaType="java.lang.String"   mode="IN"/>
            <parameter property="modified_flag"       jdbcType="VARCHAR"
      javaType="java.lang.String"   mode="IN"/>
            <parameter property="acct_id"             jdbcType="VARCHAR"
      javaType="java.lang.String"   mode="IN"/>
            <parameter property="cusip"                     jdbcType=
"VARCHAR"         javaType="java.lang.String"   mode="IN"/>
            <parameter property="tran_code"           jdbcType="VARCHAR"
      javaType="java.lang.String"   mode="IN"/>
            <parameter property="shares"              jdbcType="VARCHAR"
      javaType="java.lang.String"   mode="IN"/>
            <parameter property="date"                jdbcType="TIMESTAMP"
javaType="java.sql.Timestamp"       mode="IN"/>
            <parameter property="submit_tm"           jdbcType="VARCHAR"
      javaType="java.lang.String"   mode="IN"/>
      </parameterMap>

      <update id="updateUserSubmit" parameterMap="userTransSubmit">
            UPDATE  MY_TABLE SET SUBMITTED=?, MODIFIED_FLAG=?,
SUBMIT_ON=SYSDATE WHERE ACCT_ID = ? AND CUSIP=? AND CODE=? AND SHARES=? AND
DATE = ?
            AND  SUBMIT_ON=TO_DATE(?,'YYYY-MM-DD HH24:MI:SSSSS')
    </update>



This communication is for informational purposes only. It is not intended as an offer or solicitation
for the purchase or sale of any financial instrument or as an official confirmation of any
transaction. All market prices, data and other information are not warranted as to completeness
or accuracy and are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of JPMorgan Chase & Co., its subsidiaries and affiliates.

This transmission may contain information that is privileged, confidential, legally privileged,
and/or exempt from disclosure under applicable law. If you are not the intended recipient,
you are hereby notified that any disclosure, copying, distribution, or use of the information
contained herein (including any reliance thereon) is STRICTLY PROHIBITED. Although this transmission
and any attachments are believed to be free of any virus or other defect that might affect
any computer system into which it is received and opened, it is the responsibility of the
recipient to ensure that it is virus free and no responsibility is accepted by JPMorgan Chase
& Co., its subsidiaries and affiliates, as applicable, for any loss or damage arising
in any way from its use. If you received this transmission in error, please immediately contact
the sender and destroy the material in its entirety, whether in electronic or hard copy format.
Thank you.
 

Mime
View raw message