1 Reply Latest reply on Oct 3, 2008 9:25 AM by nickarls

    Why does Seam swallow exceptions?

    joe

      I keep getting JTA no active transaction exceptions and need to dig through the logs or step through lines of code to figure out the problem.  The problem is usually a stupid mistake somewhere in the code that would be really easy to identify if the original exception was printed out in the stack trace.  Why are these exceptions swallowed?  What is the best way to track these exceptions down. I'm using seam 2.0.2sp1, JBoss 4.2.2.GA, and JSF 1.2.  Here's one area of the seam code that swallows exceptions from the RollbackInterceptor class:



      @Interceptor(stateless=true)
      public class RollbackInterceptor extends AbstractInterceptor 
      {
         private static final long serialVersionUID = 5551801508325093417L;
         
         @AroundInvoke
         public Object aroundInvoke(InvocationContext invocation) throws Exception 
         {
            try
            {
               return invocation.proceed();
            }
            catch (Exception e)
            {
               if ( isRollbackRequired(e) )
               {
                  try
                  {
                     Transaction.instance().setRollbackOnly();
                  }
                  catch (Exception te) {} //swallow
               }
               throw e;
            }
         }




      Does any one have any troubleshooting suggestions to help track down these exceptions that causes the following JTA transaction to be thrown:


      Caused by: javax.resource.ResourceException: Transaction is not active: tx=TransactionImple < ac, BasicAction: -3f57fe55:9533:48e516de:2a9 status: ActionStatus.ABORT_ONLY