Hi all,
Please help me how to rollback transaction in ibatis. Even though AutoCommit value is set to false. Rollback of Transaction is not working. I found one Issue in GeneralStatement.java. On line 52 request.getSession().setCommitRequired(true); Here Autocommit is hardcoded it should be parameterized so that it will take value from "Autocommit" property of SqlMapConfig.xml. Please correct me if I am wrong. Regards Yuvrajs ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Thursday, January 18, 2007 9:42 PM To: [EMAIL PROTECTED]; [email protected] Subject: RE: Sybase - IBatis Null Pointer Error Yes, you remember correctly. That value, IGNORE_DONE_IN_PROC, will tell ASE to only return the finally ResultSet and not all the others produced during the execution of the sp. (Refer to the JConnect documentation) Great memory Jeff!! ________________________________ From: "Jeff Butler" <[EMAIL PROTECTED]> [mailto:"Jeff Butler" <[EMAIL PROTECTED]>] Sent: Thursday, January 18, 2007 7:32 AM To: [email protected] Subject: Re: Sybase - IBatis Null Pointer Error You have every parameter delcared as input only - is that right? Also, and I'm no ASE expert, I do remember something wierd about ASE regarding a driver setting IGNORE_DONE_IN_PROC. That might be worth looking into. Jeff Butler On 1/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED] > wrote: Hi, We are Building a Project where we use SYBASE and IBATIS. We are mapping the Objects Directly in the SQLMaps. Whenever i am doing an Select Statement inside the Stored Procedure i am getting back the Object. But When i have Insert Statement and then the Select Statement in the Stored Procedure a NULL Object is returned. We are getting a NULL PONTER Exception While trying to access the Object. I am not Sure why this is Happening. Can someone help me on this.. SQL Map has the Following <!--Procedure to Save in Transaction Master STARTS --> <resultMap id="saveTransactionResult" class ="Transaction"> <result property= "transactionId" column="TXN_ID" /> </resultMap > <parameterMap id="saveTransactionParam" class ="Transaction"> <parameter property= "assetInformation.price" jdbcType = "INTEGER" javaType="java.lang.String" mode="IN"/> <parameter property ="profile.profileId" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/> <parameter property ="transactionType" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/> <parameter property ="assetInformation.draftFlag" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/> <parameter property ="account.accountNumber" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/> <parameter property ="assetInformation.assetId" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/> <parameter property ="userId" jdbcType = "VARCHAR" javaType="java.lang.String" mode="IN"/> </parameterMap> <procedure id ="SAVE_TRANSACTION" parameterMap = "saveTransactionParam" resultMap="saveTransactionResult" > { call sp_savetransaction(?,?,?,?,?,?,?) } </procedure> The SP code is the Following create proc sp_savetransaction1 @P_TXN_AMOUNT_I varchar(20) , @P_PRFL_ID_I varchar(20) , @P_TXN_TYP_CD_I varchar(20) , @P_DRAFT_FL_I varchar(20) , @P_ACCT_NB_I varchar(20) , @P_ASSET_ID_I varchar(20) , @P_LOG_USER_I varchar(20) as declare @v_txn_axn_id int declare @v_txn_typ_id int declare @v_txn_sts_id int declare @v_txn_id int declare @v_txnwf_id int --SELECT @P_TXN_TYP_CD_I AS 'YYYY' select @v_txn_typ_id = TXN_TYPE_ID from TXN_TYPE WHERE TXN_TYPE_CD = @P_TXN_TYP_CD_I IF @P_DRAFT_FL_I = 'Y' select @v_txn_sts_id = TXN_STS_ID from TXN_STS WHERE TXN_STS_CD = 'DRFT' ELSE begin select @v_txn_axn_id = TXN_AXN_ID from TXN_ACTION_MASTER WHERE TXN_AXN_CD = 'INTD' select @v_txn_sts_id = TXN_STS_ID from TXN_STS WHERE TXN_STS_CD = 'INTD' end INSERT INTO TXN_MASTER (TXN_TYPE_ID,TXN_STS_ID,PRFL_ID,TXN_DT,TXN_AMOUNT,DRFT_FLAG,CRE_USR_ID,C RE_USR_TS,UPDT_USR_ID,UPDT_TS,ACCT_NB ,ASSET_ID) VALUES (@v_txn_typ_id,@v_txn_sts_id ,cast(@P_PRFL_ID_I as int) ,GETDATE(),cast(@P_TXN_AMOUNT_I as numeric),@P_DRAFT_FL_I ,@P_LOG_USER_I,GETDATE(),NULL,NULL, @P_ACCT_NB_I,@P_ASSET_ID_I) SET @v_txn_id = @@IDENTITY IF @P_DRAFT_FL_I <> 'Y' begin INSERT INTO TXN_WKFLW VALUES( @v_txn_id ,@v_txn_axn_id ,GETDATE(),@P_LOG_USER_I,NULL,@v_txn_axn_id,NULL,@P_LOG_USER_I,GETDATE() ,NULL,NULL) end SELECT @v_txn_id as TXN_ID return Please let me know how to proceed with this Error. Regards, Aravind Duraipandi PCS ITS Phone:(614)-213-4722 Email: [EMAIL PROTECTED] Pager: [EMAIL PROTECTED] ________________________________ 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.
