Thursday, September 22, 2011

eConnect 2010 Error: The transaction has aborted

I have a client for which I have developed over a dozen eConnect integrations.  They have been running on GP 9 for several years, and since the client recently upgraded to GP 2010, I upgraded them all a few months ago.

Although the upgraded integrations work properly, one issue that we have observed is that several of them receive an error occasionally that simply says "The transaction has aborted."

This error is occurring with multiple imports for different entities and transaction types.  For example, the error occurs when importing an inventory item, an AR cash receipt, an AR payment application, and a SOP invoice.

The error occurs intermittently and inconsistently, and the error does not seem to be related to any specific entity or transaction.  For example, when importing 2,577 inventory items, one item received the error.  If the same file is re-imported, a different item will receive the transaction aborted error.

All of the integrations are submitting each transaction individually, and each of the integrations usually processes thousands of transactions at a time.

If you check your eConnect Event Log, you will see two different messages related to the transaction aborted error.

Example 1:

Action:  Create Transaction



Current User Name:

Input parameters:



Exception type:  Microsoft.Dynamics.GP.eConnect.eConnectException



Exception message:  The transaction has aborted.



Stack Trace:

   at Microsoft.Dynamics.GP.eConnect.ServiceProxy.CreateTransactionEntity(String connectionString, String xml)

   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.EntityImportImplementation(String connectionString, String sXML, Boolean isTransaction)

   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.ProcessEntityImport(String connectionString, String sXML, Boolean isTransaction)

   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.CreateTransactionEntity(String ConnectionString, String sXML)


Example 2:

Action: Service Create Transaction



Current User Name:  DELIVERYAGENT\greatplains



Input parameters:



Exception type:  System.Transactions.TransactionAbortedException



Exception message:  The transaction has aborted.



Stack Trace:

   at System.Transactions.TransactionStateAborted.EndCommit(InternalTransaction tx)

   at System.Transactions.CommittableTransaction.Commit()

   at System.Transactions.TransactionScope.InternalDispose()

   at System.Transactions.TransactionScope.Dispose()

   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.EntityImportImplementation(String connectionString, String sXML, Boolean isTransaction)

   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.ProcessEntityImport(String connectionString, String sXML, Boolean isTransaction)

   at Microsoft.Dynamics.GP.eConnect.eConnectMethods.CreateTransactionEntity(String ConnectionString, String sXML)

   at Microsoft.Dynamics.GP.eConnect.Service.CreateTransactionEntity(String ConnectionString, String sXML)

Exception type:

System.InvalidOperationException



Exception message:

The requested operation cannot be completed because the connection has been broken.


 After trying several tests and various troubleshooting at the client, we submitted a support case.  Aaron at Microsoft called me promptly to review the details, and after searching through his notes and databases, found that this appears to be an issue with eConnect 2010 that was resolved in Service Pack 2.

The client currently has eConnect 2010 Service Pack 1 installed, so I'm going to install the Post-SP2 June 2011 Hotfix (KB 2561289), which will bring eConnect up to version 11.0.1812, to see if that resolves the issue.

I'll add an update next week as to whether this resolves the issue.


Steve Endow is a Dynamics GP Certified Trainer and Dynamics GP Certified IT Professional in Los Angeles.  He is also the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

http://www.precipioservices.com

7 comments:

Francois Kuyler said...

Have you found a solution for the error?

Steve Endow said...

Hi Francois,

I have not found a solution. I have been working with MS Support for several months, but so far, no solution.

Steve

Sean said...

Hi Steve,

I'm experiencing this same issue when processing through a large batch of eConnect transactions. 1 out of ever 2 to 3 thousand records errors out with this error. They can be re-processed and work fine the 2nd time. Were you ever able to find out the root cause of this error?

Steve Endow said...

Hi Sean,

Good timing. I have just published a new post with the cause and solution.

http://dynamicsgpland.blogspot.com/2012/04/resolution-for-econnect-2010-error.html

Steve

Unknown said...

I am encountering the same error but my code does not use the dispose() method, any ideas?

Steve Endow said...

Hi Kevin,

My only guess is that if you are sending large numbers of transactions at once, eConnect is timing out, or having a problem processing alot of transactions in a single XML document.

I would recommend trying to set the eConnect service receiveTimeout setting to see if that helps.

http://dynamicsgpland.blogspot.com/2012/03/econnect-2010-error-there-was-error.html

Otherwise, I would try reducing the number of transactions you are sending at a time in a single XML doc.

Steve

Unknown said...

Hey Kevin,

I finally figured out what the problem was in my case.. Turns out the client was using some obscure port for tcp/ip so instead of using TCP/IP to connect it was using named pipes. The problem with this is that the client network is very slow and connecting via named pipes on a slow network causes timeouts. Hope this helps you

Nunzia