Forum Stats

  • 3,783,401 Users
  • 2,254,768 Discussions


Getting AccessViolationException

I'm using distributed transactions w/ 9i and 9i client, and .Net 3.0. I am getting an AccessViolationException.

I have verified / set-up the following:

- Replaced debug version of oramts.dll
- Enabled DTC, including XA transactions
- Also verified DTC is set to startup automatically
- Enabled XA transactions in dB

In some cases it works, and in others it doesn't. For example, in one instance it performs a local insert / update, then a remote insert / update (via WCF) and it works every time. In another instance, a local insert / update is again followed by a remote insert / update, but then the pattern may be repeated multiple times, it always gives an AccessViolationException, and it always come from System.Data.Common.UnsafeNativeMethods.OraMTSJoinTxn.

Any assistance would be appreciated. Stack trace is below. Thanks!

System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
at System.Data.Common.UnsafeNativeMethods.OraMTSJoinTxn(OciEnlistContext pCtxt, IDtcTransaction pTrans)
at System.Data.OracleClient.TracedNativeMethods.OraMTSJoinTxn(OciEnlistContext pCtxt, IDtcTransaction pTrans)
at System.Data.OracleClient.OracleInternalConnection.Enlist(String userName, String password, String serverName, Transaction transaction, Boolean manualEnlistment)
at System.Data.OracleClient.OracleInternalConnection.Activate(Transaction transaction)
at System.Data.ProviderBase.DbConnectionInternal.ActivateConnection(Transaction transaction)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OracleClient.OracleConnection.Open()
at FHR.Data.DataAccess._executeNonQuery(IDbCommand command, IDbTransaction transaction, Int32& returnVal, Object[]& outputParms)
--- End of inner exception stack trace ---
at FHR.Data.DataAccess._executeNonQuery(IDbCommand command, IDbTransaction transaction, Int32& returnVal, Object[]& outputParms)
at FHR.Data.DataAccess.ExecuteNonQuery(IDbCommand command, IDbTransaction transaction, Int32& returnVal, Object[]& outputParms)
at FHR.TICA.Business.BaseDALC.GetCurrentDate()
at FHR.TICA.Business.BaseBusinessEntity.GetCurrentDate()
at FHR.TICA.Business.PhysicalTrade.LoadTrade(Int32 tradeNo, String GetMasterTrade, String ActionCode)
at FHR.TICA.Business.Trade.LoadTrade(Int32 tradeNo, Boolean GetMasterTrade, String ActionCode)
at FHR.TICA.Business.Trade.GetTypedInstance(Int32 tradeNumber, String userId, Providers dbType, String action)
at FHR.TICA.Business.CancelForFee.Update()
at FHR.Business.BusinessEntity.Save(Boolean ignore)
at FHR.TICA.Business.WebService.CancelForFeeService.Save(CancelForFeeDataSet ds, Boolean ignore)
This discussion has been closed.