8 Replies Latest reply on Feb 5, 2008 4:36 AM by nhpvti

    Transaction won't commit from MDB Seam2 component

    jazir1979

      Hi,

      I have an MDB annotated with @Name, which worked fine in 1.2.1.GA.

      But now, when the app server attemps to commit following a successful message, I get this...

      10:12:29,703 INFO [DownloadManager] Finished processing file: c:\download\received\2AZ3MQ_20060627134443
      10:12:29,703 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@f66eac
      java.lang.IllegalStateException: No application context active
       at org.jboss.seam.Component.forName(Component.java:1690)
       at org.jboss.seam.Component.getInstance(Component.java:1740)
       at org.jboss.seam.Component.getInstance(Component.java:1735)
       at org.jboss.seam.Component.getInstance(Component.java:1712)
       at org.jboss.seam.Component.getInstance(Component.java:1707)
       at org.jboss.seam.core.Events.instance(Events.java:154)
       at org.jboss.seam.transaction.SynchronizationRegistry.beforeTransactionCompletion(SynchronizationRegistry.java:51)
       at org.jboss.seam.transaction.EjbTransaction.beforeCompletion(EjbTransaction.java:43)
       at org.jboss.ejb3.stateful.SessionSynchronizationInterceptor$SFSBSessionSynchronization.beforeCompletion(SessionSynchronizationInterceptor.java:71)
       at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:249)
       at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:88)
       at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1256)
       at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:135)
       at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:87)
       at org.jboss.resource.adapter.jms.inflow.JmsServerSession$XATransactionDemarcationStrategy.end(JmsServerSession.java:494)
       at org.jboss.resource.adapter.jms.inflow.JmsServerSession.run(JmsServerSession.java:248)
       at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:204)
       at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:275)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:743)
       at java.lang.Thread.run(Thread.java:595)
      


      The MDB is using CMT (obviously), and was using a standard @PersistenceContext. I tried changing it to inject my seam-managed PC, but the error was still the same.

      any ideas?
      Daniel.

      PS: sorry for all the posts, I feel I may have jumped to Seam2 Beta a bit too early, but hopefully the error reports do help.


        • 1. Re: Transaction won't commit from MDB Seam2 component
          gavin.king

          Please report this in JIRA, it should be an easy fix. Thanks.

          • 2. Re: Transaction won't commit from MDB Seam2 component
            jazir1979
            • 3. Re: Transaction won't commit from MDB Seam2 component
              gavin.king

              Fixed, HTH.

              • 4. Re: Transaction won't commit from MDB Seam2 component
                jazir1979

                 

                "gavin.king@jboss.com" wrote:
                Fixed, HTH.


                Thanks Gavin. This does work, but should I be concerned about the following WARN level trace?
                11:56:27,828 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_4] TwoPhaseCoordinator.afterCompletion - returned failure for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@1e3a7ec
                11:56:27,828 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_4] TwoPhaseCoordinator.afterCompletion - returned failure for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@125b88c
                11:56:27,828 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_4] TwoPhaseCoordinator.afterCompletion - returned failure for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@1770daa
                11:56:27,828 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_4] TwoPhaseCoordinator.afterCompletion - returned failure for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@122292a
                


                Can you give me a brief overview on what this synchronization registry is all about? I'm in a normal JBoss4.2/JTA environment.



                • 5. Re: Transaction won't commit from MDB Seam2 component
                  gavin.king

                  I need to see the actual nature of the failure. Try turning on more verbose logging.

                  • 6. Re: Transaction won't commit from MDB Seam2 component
                    jazir1979

                     

                    "gavin.king@jboss.com" wrote:
                    I need to see the actual nature of the failure. Try turning on more verbose logging.


                    I haven't been able to get any more info, I've tried fiddling with jbossjta-properties.xml and my Log4J config, but no success.

                    I found this: http://jira.jboss.com/jira/browse/EJBTHREE-898

                    I'm giving up for now, since the functionality actually works, but I guess something is lurking under here ready to bite me.


                    • 7. WARN TwoPhaseCoordinator.afterCompletion
                      nwray

                      Hi, I'm seeing the same issue with the recurring WARN message. I get the following warning from TwoPhaseCoordinator.afterCompletion with each iteration of an async task. Nothing obvious is failing, the warning might be in error or could be due to some misconfiguration on my part. It's been annoying during development but it would be nice to resolve it before deployment.

                      10:45:24,468 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_4] TwoPhaseCoordinator.afterCo
                      mpletion - returned failure for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@c03bcd

                      I've added a comment to the open JIRA below with more details, please let me know if I can add anything else.
                      http://jira.jboss.com/jira/browse/EJBTHREE-898

                      • 8. Re: WARN TwoPhaseCoordinator.afterCompletion
                        nhpvti

                         

                        "nwray" wrote:
                        Hi, I'm seeing the same issue with the recurring WARN message. I get the following warning from TwoPhaseCoordinator.afterCompletion with each iteration of an async task. Nothing obvious is failing, the warning might be in error or could be due to some misconfiguration on my part. It's been annoying during development but it would be nice to resolve it before deployment.

                        10:45:24,468 WARN [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_4] TwoPhaseCoordinator.afterCo
                        mpletion - returned failure for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@c03bcd

                        I've added a comment to the open JIRA below with more details, please let me know if I can add anything else.
                        http://jira.jboss.com/jira/browse/EJBTHREE-898

                        I'm getting the same warning after each run of a scheduled job, although the job succeeds.
                        By the way, I've set EJBTimerService datasource in $JBOSS_HOME/server/default/deploy/ejb-deployer.xml to the same as my application is using in order to have better control over my batch jobs and to avoid multiple non-XA datasources, but the warning is still generated.

                        My environment:
                        JBoss 4.2.2.GA
                        Seam 2.0.0.GA
                        JDK 1.5.0_14