COM+ : 0x8004E002 : The root transaction wanted to commit, but transaction aborted.


The COM+ application ‘eConnect’ is unable to complete distributed transactions successfully against the SQL server. It fails with the error :

(0x8004E002): The root transaction wanted to commit, but transaction aborted.

 The eConnect COM+ application tries to send xml data to the SQL server on another server. Both the servers are Windows 2008. It runs for a while and then comes back with the error message :

System.Runtime.InteropServices.COMException (0x8004E002): The root transaction wanted to commit, but transaction aborted (Exception from HRESULT: 0x8004E002)
at System.EnterpriseServices.IRemoteDispatch.RemoteDispatchNotAutoDone(String s)
at System.EnterpriseServices.RemoteServicedComponentProxy.Invoke(IMessage reqMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
at Microsoft.Dynamics.GP.eConnect.eConnectMethods.eConnect_EntryPoint(String ConnectionString, ConnectionStringType ConnectionType, String sXML,
SchemaValidationType ValidationType, String eConnectSchema)
at DirectDocSenderDotNet.FrmDocSender.btnSend_Click(Object sender, EventArgs e)
in C:\program files\Common Files\microsoft shared\eConnect 10\eConnect Samples\CSHARP DirectDocSender\frmDocSender.cs:line 379

Checked the DTC security settings under component services –> computers –> My computer –> local dtc –> security. Enabled Network DTC access and the other options :

Allow remote clients
Allow remote administrations
Allow inbound
Allow outbound
No authentication required

Enabled the same options on the SQL Server machine. Still the transaction would run for a while and then abort. The global transaction timeout of DTC was set to 360 seconds under component services –> computers –> My computer –> properties –> Options. Configured the same timeout on SQL server box. Still no luck.
We checked the C:\windows\system32\DTCTrace.log file and found that the transactions were being aborted by the SQL server box.

 

Resolution

We checked the transaction timeout on the COM+ components and they were set to 120 seconds. Changed them to 360 on all the transactional components. Ran the transaction and now it completed successfully.

Comments (2)

  1. Patrick says:

    If anyone gets this error, it is typically associated with the the COM or transaction timing out. So you might have to mess with the COM settings.

    I changed two settings (so I am not sure which one took care of this issue)…

    Component Services > My Computer > COM+ Applications > eConnect 9 for Great Plains (right click for properties) then click on Pooling & Recycling tab. I was committing a lot of transactions so I changed the the default setting of 15 minutes to 30 min.

    I also set the transaction timeout at the top level (MY Computer) to 120 seconds – it was 60 by default.

  2. ajity says:

    Under the Pooling and Recycling tab, you have changed the default Expiration timeout to 30 minutes. This timeout essentially gives more time to the dying dllhost.exe to clean up the resources before it will be forcibly shut down. This should not impact the transactions outcome.Please refer to :

    msdn.microsoft.com/…/ms684192(v=VS.85).aspx

    Apart from setting the global transaction timeout under component services –> computers –> My computer –> Options, please ensure that you are not overriding this timeout at the COM+ component level. Just right click on the component and check the properties. Uncheck the option "Override global transaction timeout value" unless you want to override it.