Print Page | Close Window

TransactionInDoubtException

Printed From: IdeaBlade
Category: DevForce
Forum Name: DevForce 2012
Forum Discription: For .NET 4.5
URL: http://www.ideablade.com/forum/forum_posts.asp?TID=3730
Printed Date: 25-Oct-2025 at 11:00pm


Topic: TransactionInDoubtException
Posted By: mikke63
Subject: TransactionInDoubtException
Date Posted: 19-Oct-2012 at 4:22am
Platform: Win7, SL5, NET4.5, DF2012, Oracle
 
Simple case; one table, single column primary key. Execute entity query to select one record by PK. Then mark entity for deletion and call SaveChangesAsync. Failes with TransactionInDoubtException. Full exception dump below.
What I see from the exception dump is that System.Transactions.CommittableTransaction.Commit() has been called. The record is however not deleted in the database, bringing me to believe that the exception results from DF (EF) detecting that no record was removed and hence becomming in doubt.
 
With other entities in the same database I can delete records without problem.
 
Can this be the result of a failing concurrency detection? The entity record in question is not modified by others, so there is no actual concurrency problem.
 
Any ideas that can point me in the right direction?
 
Thanks, Mikael
 
 
IdeaBlade.EntityModel.EntityManagerSaveException was unhandled by user code
  Message=The transaction is in doubt.
  Cancelled=false
  RemoteExceptionDetails=System.Transactions.TransactionInDoubtException: The transaction is in doubt.
   at System.Transactions.TransactionStatePromotedIndoubt.PromotedTransactionOutcome(InternalTransaction tx)
   at System.Transactions.TransactionStatePromotedEnded.EndCommit(InternalTransaction tx)
   at System.Transactions.CommittableTransaction.Commit()
   at System.Transactions.TransactionScope.InternalDispose()
   at System.Transactions.TransactionScope.Dispose()
   at IdeaBlade.EntityModel.Server.EntitySaveTransactionManager.SaveWithTransaction(IEntityServer entityServer, SaveWorkState workState)
   at IdeaBlade.EntityModel.Server.EntitySaveTransactionManager.Save(IEntityServer entityServer, SaveWorkState workState)
   at IdeaBlade.EntityModel.Server.EntityServerSaveInterceptor.ExecuteSave()
   at IdeaBlade.EntityModel.Server.EntityServerSaveInterceptor.OnExecuteSave()
  RemoteExceptionName=System.Transactions.TransactionInDoubtException, System.Transactions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
  RemoteSource=System.Transactions
  RemoteStackTrace=   at System.Transactions.TransactionStatePromotedIndoubt.PromotedTransactionOutcome(InternalTransaction tx)
   at System.Transactions.TransactionStatePromotedEnded.EndCommit(InternalTransaction tx)
   at System.Transactions.CommittableTransaction.Commit()
   at System.Transactions.TransactionScope.InternalDispose()
   at System.Transactions.TransactionScope.Dispose()
   at IdeaBlade.EntityModel.Server.EntitySaveTransactionManager.SaveWithTransaction(IEntityServer entityServer, SaveWorkState workState)
   at IdeaBlade.EntityModel.Server.EntitySaveTransactionManager.Save(IEntityServer entityServer, SaveWorkState workState)
   at IdeaBlade.EntityModel.Server.EntityServerSaveInterceptor.ExecuteSave()
   at IdeaBlade.EntityModel.Server.EntityServerSaveInterceptor.OnExecuteSave()
  StackTrace:
       at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccess(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.ValidateEnd(Task task)
       at System.Runtime.CompilerServices.TaskAwaiter.GetResult()
       at Parka.Controls.Customer.vmSelectedCustomer.<<get_CommandDeleteData>b__13>d__15.MoveNext()
  InnerException:



Replies:
Posted By: mgood
Date Posted: 19-Oct-2012 at 10:47am
Mikael,
This exception comes from your Oracle database. There's something not quite right with your database. See the following link that explains when a transaction can come in doubt.

http://docs.oracle.com/cd/B28359_01/server.111/b28310/ds_txns004.htm - http://docs.oracle.com/cd/B28359_01/server.111/b28310/ds_txns004.htm



Print Page | Close Window