ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aravind (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Created: (IBATIS-383) IBATIS - SYBASE Stored Procedure NULL POINTER EXCEPTION
Date Wed, 17 Jan 2007 23:42:30 GMT

                 Key: IBATIS-383
                 URL: https://issues.apache.org/jira/browse/IBATIS-383
             Project: iBatis for Java
          Issue Type: Bug
         Environment: I am Using WAS5.1,Window Platform, IBATIS, SYBASE
            Reporter: Aravind
            Priority: Blocker

I have a Stored Procedure which insert Data into a Table and a Select statement after that
which returns the identity Column value back.

The following is the Parameter Map i am using Object

<!--Procedure to Save in Transaction Master STARTS -->
<resultMap id="saveTransactionResult" class="Transaction">
<result property="transactionId" column="TXN_ID"/>

<parameterMap id="saveTransactionParam"  class="Transaction">
<parameter property="assetInformation.price" jdbcType = "INTEGER" javaType="java.lang.String"
<parameter property="profile.profileId" jdbcType = "VARCHAR" javaType="java.lang.String"
<parameter property="transactionType" jdbcType = "VARCHAR" javaType="java.lang.String"
<parameter property="assetInformation.draftFlag" jdbcType = "VARCHAR" javaType="java.lang.String"
<parameter property="account.accountNumber" jdbcType = "VARCHAR" javaType="java.lang.String"
<parameter property="assetInformation.assetId" jdbcType = "VARCHAR" javaType="java.lang.String"
<parameter property="userId" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/>

<procedure id="SAVE_TRANSACTION" parameterMap ="saveTransactionParam" resultMap="saveTransactionResult">
{ call sp_savetransaction(?,?,?,?,?,?,?) }

Java Code where i make the Call to Stored Procedure is below..

Transaction tran = (Transaction)queryForObject(SAVE_TRANSACTION, transactionDto.getTransaction());

I am using QueryforObject Method to Invoke the Stored Procedure.
Whenever the Stored Procedure has Select statements alone.. I am getting back the Object with
Data...But if the Stored Procedure is having Insert Statements and then a select Statement
..The Object is not Returned and giving NULL POINTER Exception while trying to Access the
Object. But Eventhough i get no object back the Insert Statement get executed Successfully
and i can see the Details in the Table.

Please help me on this Issue as we are not able to Proceed further...and we are falling behind
on our deadline dates for the project to go into Prodn due to this issue...

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message