4 Replies Latest reply: Dec 23, 2004 11:39 AM by 389685 RSS

    Error:The root transaction wanted to commit, but the transaction aborted

    412555
      Help me!

      There was an fital error in my N-Tier application(OraOleDB,Ado,Com+,Oracle). Here's the error message: The root transaction wanted to commit, but the transaction aborted. Often but not every time raised out when our customers choose to save data.
      The application enviroment is just as following:
      Oracle 9.2.0.1.0 Enterprise Editon(including default Oracle Client and Oracle Provider for OleDB) + Oracle9i 9.2.0.1.1 Patch for Oracle Service for MTS;
      Window2000 Server + SP3;
      MDAC 2.7;
      (Design IDE)Delphi 7;

      I opened the Oracle OLEDB Trance, found the following message:
      ***OracleMTSRecoveryService(XXX).trc***
      [Debug] m_pListen->Create OK��
      [...][00000388] CHttpSvrDoc::StartListening() - exiting.
      [...][00000388] CHttpSvrDoc::CHttpSvrDoc() - exiting.
      [...][0000037c] service_main() - worker thread initialization success
      [...][00000388] workerThread() - wait returned due to pending message
      [...][00000388] workerThread() - wait returned due to pending message
      [...][00000388] workerThread() - wait returned due to pending message
      [...][00000388] workerThread() - wait returned due to pending message
      [...][00000388] workerThread() - wait returned due to pending message
      [...][00000388] workerThread() - wait returned due to pending message
      ***OraMTSSCPXXX.trc***
      [00000a2c] kpntsess::transactionPrepare() - failed. - XID: ...
      [00000a2c] kpntcheckerr() - OCI_ERROR - 2051.
      [00000a2c] kpntcheckerr() - O.
      [00000a2c] kpntctra::doPrepare() - aborting all branches
      [00000a2c] kpntctra::abortBranch() - XID: ...
      [00000a2c] kpntsess::transactionAbort()-success-XID: ...
      ...
      [00000a2c] kpntsenp::enlist() - XID: ...
      [00000a2c] kpntctra::doPrepare() - preparing 2 branches.
      [00000a2c] kpntctra::prepareBranch() - XID: ...
      [00000a2c] kpntsess::transactionPrepare() - readonly.- XID: ...
      [00000a2c] kpntctra::prepareBranch() - XID: ...
      [00000a2c] kpntsess::transactionPrepare() - failed. - XID: ...
      [00000a2c] kpntcheckerr() - OCI_ERROR - 2056.
      [00000a2c] kpntcheckerr() - O.
      [00000a2c] kpntctra::doPrepare() - aborting all branches
      [00000a2c] kpntctra::abortBranch() - XID: ...
      [00000a2c] kpntsess::transactionAbort() - success - XID: ...
      ...
      One more thing DLLhost.exe keep more and more Sessions during my application running, all these are INACTIVE, I must close my com+ application to kill them or enter manager console to kill them manually.
      What's up?
      Any advice should be appriciated.
      Thanks a lot.
        • 1. Re: Error:The root transaction wanted to commit, but the transaction aborte
          424074
          I'm getting a similar problem which manifests itself as the same 'The root transaction wanted to commit, but the transaction aborted.' error.

          This error seems to occur intermittentaly, but can easily be reproduced in a test environment. We have a server component that processes work and can use up to 25 threads at a time, so to reproduce the error all we need to do is to create a large queue of work and leave it until the error occurs.

          Our application is written in C# and has a COM+ component using the 9.2.0.4.1 Patch for Oracle Service for MTS. I have swiched on tracing and the MTS trace logs contain the following each time the error occurs:

          [06/24/2004-14:52:58:921][00000950] kpntsess::transactionPrepare() - failed. - XID: 0x44444444-25d86fa4f3928849b8249bcea17eac1300000000-b7c735926a72304aad4107184db6cf3001000000435444010007ee7a697070792e616e69746570732e636f6d
          [06/24/2004-14:52:58:921][00000950] kpntcheckerr() - OCI_INVALID_HANDLE.
          [06/24/2004-14:52:58:921][00000950] kpntcheckerr() - .
          [06/24/2004-14:52:58:921][00000950] kpntctra::doPrepare() - aborting all branches

          I have also looked at the connection pooling trace and the MSDTC trace but neither of these traces contain anything useful.

          Any information or advice on this problem would be much appreciated.
          • 2. Re: Error:The root transaction wanted to commit, but the transaction aborted
            427706
            I has a same problem, Can you help me.

            Email: Chientd@fpt.com.vn

            Thanks!




            • 3. Re: Error:The root transaction wanted to commit, but the transaction aborted
              299966
              This occurs when you are getting a timeout waiting for a reply that occurs in your MTS component not from Oracle or ODBC. You can change the default time-out by right clicking your application in component services, and selecting a longer time out in seconds.
              • 4. Re: Error:The root transaction wanted to commit, but the transaction aborted
                389685
                I am using odp.net version 9.2.040 and have increased the timeout on the component to 180 seconds. The MTS application has activation type library, so runs in the creator's process. Without a transaction it takes 30 seconds. However, i am still getting the error in the transaction after 30 seconds. any ideas?

                Thanks.