BTM
  1. BTM
  2. BTM-103

Ability to debug 'executing transaction with 0 enlisted resource' error message

    Details

    • Type: New Feature New Feature
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.1.0
    • Fix Version/s: 2.1.3
    • Labels:
      None
    • Number of attachments :
      0

      Description

      BTM provides a very good reporting when one tries to commit a transaction with no enlisted resource. These are most probably development errors.

      Adding a flag or a logging strategy that would output the stack trace of the creation of the transaction as well as the stack trace of the commit of that transaction would definitely help to spot the actual issue.

        Activity

        Hide
        Ludovic Orban added a comment -

        I implemented such mechanism and deployed a 2.1.3-SNAPSHOT version in the codehaus snapshot repository.

        Could you please try it out and report back here if it works as you expected? See http://docs.codehaus.org/display/BTM/Maven2#Maven2-Earlyversions for the details about how to configure your Maven 2 pom to get access to the BTM snapshots.

        Thanks!

        Show
        Ludovic Orban added a comment - I implemented such mechanism and deployed a 2.1.3-SNAPSHOT version in the codehaus snapshot repository. Could you please try it out and report back here if it works as you expected? See http://docs.codehaus.org/display/BTM/Maven2#Maven2-Earlyversions for the details about how to configure your Maven 2 pom to get access to the BTM snapshots. Thanks!
        Hide
        Stéphane Nicoll added a comment -

        I am having issues accessing the codehaus nexus repository (the snapshot is corrupted it seems). I will try to do a local build over here.

        Show
        Stéphane Nicoll added a comment - I am having issues accessing the codehaus nexus repository (the snapshot is corrupted it seems). I will try to do a local build over here.
        Hide
        Stéphane Nicoll added a comment -

        Added a flag to debug zero resource transaction. When this is enabled, you can get that kind of log

        2012-04-25 21:45:24,704 [main] {3139322E3136382E312E3400000136EB096AD300000001} [WARN,b.t.t.Preparer] executing transaction with 0 enlisted resource
        2012-04-25 21:45:24,709 [main] {3139322E3136382E312E3400000136EB096AD300000001} [WARN,b.t.BitronixTransaction] committed transaction with 0 enlisted resource
        ==================== Began at ====================
        bitronix.tm.utils.StackTrace
        	at bitronix.tm.BitronixTransaction.setActive(BitronixTransaction.java:373)
        	at bitronix.tm.BitronixTransactionManager.begin(BitronixTransactionManager.java:126)
        	at bitronix.tm.JtaTest.testDebugZeroResourceTransaction(JtaTest.java:204)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at junit.framework.TestCase.runTest(TestCase.java:164)
        	at junit.framework.TestCase.runBare(TestCase.java:130)
        	at junit.framework.TestResult$1.protect(TestResult.java:106)
        	at junit.framework.TestResult.runProtected(TestResult.java:124)
        	at junit.framework.TestResult.run(TestResult.java:109)
        	at junit.framework.TestCase.run(TestCase.java:120)
        	at junit.textui.TestRunner.doRun(TestRunner.java:121)
        	at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:139)
        	at junit.textui.TestRunner.doRun(TestRunner.java:114)
        	at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:52)
        	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:182)
        	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
        
        ==================== Committed at ====================
        bitronix.tm.utils.StackTrace
        	at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:294)
        	at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143)
        	at bitronix.tm.JtaTest.testDebugZeroResourceTransaction(JtaTest.java:207)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at junit.framework.TestCase.runTest(TestCase.java:164)
        	at junit.framework.TestCase.runBare(TestCase.java:130)
        	at junit.framework.TestResult$1.protect(TestResult.java:106)
        	at junit.framework.TestResult.runProtected(TestResult.java:124)
        	at junit.framework.TestResult.run(TestResult.java:109)
        	at junit.framework.TestCase.run(TestCase.java:120)
        	at junit.textui.TestRunner.doRun(TestRunner.java:121)
        	at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:139)
        	at junit.textui.TestRunner.doRun(TestRunner.java:114)
        	at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:52)
        	at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:182)
        	at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
        
        Show
        Stéphane Nicoll added a comment - Added a flag to debug zero resource transaction. When this is enabled, you can get that kind of log 2012-04-25 21:45:24,704 [main] {3139322E3136382E312E3400000136EB096AD300000001} [WARN,b.t.t.Preparer] executing transaction with 0 enlisted resource 2012-04-25 21:45:24,709 [main] {3139322E3136382E312E3400000136EB096AD300000001} [WARN,b.t.BitronixTransaction] committed transaction with 0 enlisted resource ==================== Began at ==================== bitronix.tm.utils.StackTrace at bitronix.tm.BitronixTransaction.setActive(BitronixTransaction.java:373) at bitronix.tm.BitronixTransactionManager.begin(BitronixTransactionManager.java:126) at bitronix.tm.JtaTest.testDebugZeroResourceTransaction(JtaTest.java:204) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.textui.TestRunner.doRun(TestRunner.java:121) at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:139) at junit.textui.TestRunner.doRun(TestRunner.java:114) at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:52) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:182) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120) ==================== Committed at ==================== bitronix.tm.utils.StackTrace at bitronix.tm.BitronixTransaction.commit(BitronixTransaction.java:294) at bitronix.tm.BitronixTransactionManager.commit(BitronixTransactionManager.java:143) at bitronix.tm.JtaTest.testDebugZeroResourceTransaction(JtaTest.java:207) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:120) at junit.textui.TestRunner.doRun(TestRunner.java:121) at com.intellij.junit3.JUnit3IdeaTestRunner.doRun(JUnit3IdeaTestRunner.java:139) at junit.textui.TestRunner.doRun(TestRunner.java:114) at com.intellij.junit3.JUnit3IdeaTestRunner.startRunnerWithArgs(JUnit3IdeaTestRunner.java:52) at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:182) at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:62) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:120)
        Hide
        Ludovic Orban added a comment -

        Cleaned up and merged back to 2.1.x branch. Thanks for the fix!

        Show
        Ludovic Orban added a comment - Cleaned up and merged back to 2.1.x branch. Thanks for the fix!

          People

          • Assignee:
            Ludovic Orban
            Reporter:
            Stéphane Nicoll
          • Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: