3 Replies Latest reply on Mar 16, 2006 6:38 PM by gavin.king

    annoying

    coryvirok

      I'm in the process of learning + developing my Seam enabled web app and I find myself needing to redeploy all the time. Since I'm also new to JSF, I sometimes need to redeploy because of a stupid JSF bug in my .xhtml files.

      Some of the time the error will occur right after a make a call to a @Begin method. When I go ahead and redeploy, I will often times get this exception:

      Caused by: javax.transaction.NotSupportedException: Transaction already active, cannot nest transactions.
       at org.jboss.tm.TxManager.begin(TxManager.java:208)
       at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:124)
       at org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener.begin(SeamExtendedManagedPersistencePhaseListener.java:61)
       ... 27 more
      


      Now I'm guessing that this is because my previous deployment still had a transaction open. Is there a way to FLUSH all of the transactions on a redeploy?

      I've added the following to my faces config file to get the Seam managed transactions:

      <lifecycle>
       <phase-listener>org.jboss.seam.jsf.SeamExtendedManagedPersistencePhaseListener</phase-listener>
      </lifecycle>
      


      and this to my web.xml file for Seam to handle exceptions, (which I thought would take care of this problem)

      <filter>
       <filter-name>Seam Exception Filter</filter-name>
       <filter-class>org.jboss.seam.servlet.SeamExceptionFilter</filter-class>
      </filter>
      <filter-mapping>
       <filter-name>Seam Exception Filter</filter-name>
       <url-pattern>*.xhtml</url-pattern>
      </filter-mapping>
      


      The only way I've found to really get JBoss not to give me the transaction errors is to restart it, which is *very* painful to do for small JSF syntax errors.

      Any help is appreciated.

      Thanks,
      - Cory

        • 1. Re: annoying
          gavin.king

          Yeah, I've also been frustrated by this one. I *think* it is a bug in JBoss AS. I actually havn't seen it for a while and had thought it was fixed in 4.0.4RC1.

          If you can create any kind of reproducable testcase, report it in JBoss AS JIRA. I was never able to reproduce it reliably.

          • 2. Re: annoying
            coryvirok

            I've been trying to figure this bug out and might have come across some useful information...

            I noticed that whenever I did *not* define a method for a stateful bean that had the @Remove @Destroy annotations, I could load the JSF page that referenced it once and each subsequent refresh caused the "Transaction already active."

            I realize that this is definitely defined in the manual, but I am unsure if the lack of a destroy method should hang Seam, requiring a restart.

            Not too sure if that helps at all.

            - Cory

            • 3. Re: annoying
              gavin.king

              If you can create an EAR, along with some instructions for how to make the error occur, that would be awesome.