0 Replies Latest reply on Mar 15, 2008 1:21 PM by William Woodman

    why do i get a transaction failure when listening for success event?

    William Woodman Master

      i'm trying to use the seam framework CRUD classes.


      I have nodeHome and nodeList classes defined.  Im trying to get an auto update on the nodeList.xhtml whenever i successfully create a new node by listening on the success complete event in components.xml.


      
       <event type="org.jboss.seam.afterTransactionSuccess.Node">
      
        <action execute="#{nodeList.getResultList()}"/>
      
       </event>
      
      



      heres is my exception, when i successfully create node on the hode.xhtml form.  Cant see why i get this as the getResultList() method is marked as @transactional.


      
      12:06:35,515 INFO  [STDOUT] Hibernate: 
      
          update
      
              Node 
      
          set
      
              version=?,
      
              lastUpdated=?,
      
              createDate=?,
      
              name=?,
      
              aliasName=?,
      
              description=?,
      
              weight=?,
      
              importance=? 
      
          where
      
              nodeID=? 
      
              and version=?
      
      12:06:35,795 ERROR [SynchronizationRegistry] Exception processing transaction Synchronization after completion
      
      javax.el.ELException: javax.transaction.NotSupportedException
      
           at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:333)
      
           at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:274)
      
           at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
      
           at org.jboss.el.parser.AstMethodSuffix.invoke(AstMethodSuffix.java:65)
      
           at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
      
           at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
      
           at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:173)
      
           at org.jboss.seam.core.Events.raiseEvent(Events.java:67)
      
           at org.jboss.seam.async.AsynchronousEvent.call(AsynchronousEvent.java:27)
      
           at org.jboss.seam.async.Asynchronous.executeInContexts(Asynchronous.java:76)
      
           at org.jboss.seam.async.Asynchronous.execute(Asynchronous.java:45)
      
           at org.jboss.seam.async.TransactionSuccessEvent.afterCompletion(TransactionSuccessEvent.java:24)
      
           at org.jboss.seam.transaction.SynchronizationRegistry.afterTransactionCompletion(SynchronizationRegistry.java:42)
      
           at org.jboss.seam.transaction.EjbSynchronizations.afterCompletion(EjbSynchronizations.java:80)
      
           at org.jboss.ejb3.stateful.SessionSynchronizationInterceptor$SFSBSessionSynchronization.afterCompletion(SessionSynchronizationInterceptor.java:87)
      
           at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:136)
      
           at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:340)
      
           at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93)
      
           at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:177)
      
           at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1389)
      
           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.tm.usertx.client.ServerVMClientUserTransaction.commit(ServerVMClientUserTransaction.java:140)
      
           at org.jboss.seam.transaction.UTTransaction.commit(UTTransaction.java:52)
      
           at org.jboss.seam.jsf.SeamPhaseListener.commitOrRollback(SeamPhaseListener.java:592)
      
           at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPhase(SeamPhaseListener.java:330)
      
           at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:231)
      
           at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:182)
      
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:280)
      
           at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
      
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
      
           at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
      
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
           at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
      
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
           at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
      
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
           at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      
           at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      
           at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
      
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
           at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
      
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
           at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
           at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
      
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
           at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
      
           at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
      
           at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      
           at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
      
           at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
      
           at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
      
           at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
      
           at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
      
           at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
      
           at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      
           at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
      
           at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      
           at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
      
           at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      
           at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
      
           at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
      
           at java.lang.Thread.run(Thread.java:619)
      
      Caused by: javax.transaction.NotSupportedException
      
           at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.begin(BaseTransaction.java:79)
      
           at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.begin(BaseTransactionManagerDelegate.java:77)
      
           at org.jboss.tm.usertx.client.ServerVMClientUserTransaction.begin(ServerVMClientUserTransaction.java:124)
      
           at org.jboss.seam.transaction.UTTransaction.begin(UTTransaction.java:39)
      
           at org.jboss.seam.util.Work.workInTransaction(Work.java:35)
      
           at org.jboss.seam.transaction.TransactionInterceptor.aroundInvoke(TransactionInterceptor.java:32)
      
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      
           at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:42)
      
           at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
      
           at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
      
           at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:166)
      
           at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:102)
      
           at org.domain.WillsSeamProject.session.NodeList_$$_javassist_2.getResultList(NodeList_$$_javassist_2.java)
      
           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 org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:329)
      
           ... 67 more
      
      



      here is the form logic (works okay in browser) bu the exception is thrown every time in the as log


                          
      
      <ui:define name="body">
      
          
      
          <h:messages globalOnly="true" styleClass="message"/>
      
          
      
          <h:form id="nodeForm">
      
      
              <rich:panel>
      
                  <f:facet name="header">node</f:facet>
      
          
      
                  <s:decorate id="nameDecoration" template="layout/edit.xhtml">
      
                      <ui:define name="label">Name</ui:define>
      
                      <h:inputText id="name" required="true"
      
                                   value="#{node.name}"/>
      
                  </s:decorate>
      
      
                  <s:decorate id="aliasDecoration" template="layout/edit.xhtml">
      
                      <ui:define name="label">Alias</ui:define>
      
                      <h:inputText id="alias" required="false"
      
                                   value="#{node.aliasName}"/>
      
                  </s:decorate>
      
      
                  <s:decorate id="descDecoration" template="layout/edit.xhtml">
      
                      <ui:define name="label">Description</ui:define>
      
                      <h:inputText id="description" required="false"
      
                                   value="#{node.description}"/>
      
                  </s:decorate>
      
                  
      
                  <s:decorate id="importanceDecoration" template="layout/edit.xhtml">
      
                      <ui:define name="label">Importance</ui:define>
      
                      <h:inputText id="importance" required="false"
      
                                   value="#{node.importance}"/>
      
                  </s:decorate>
      
       
      
                  
      
                  <div style="clear:both"/>
      
                  
      
              </rich:panel>
      
      
              <div class="actionButtons">
      
                  <h:commandButton id="save" 
      
                               value="Save" 
      
                               action="#{nodeHome.persist}"
      
                               rendered="#{!nodeHome.managed}"/>  
      
                   <!-- stop conversation and restart with new node -->                 
      
                   <s:button id="new" 
      
                               value="New" 
      
                               propagation="end"
      
                               rendered="#{nodeHome.managed}"
      
                               view="/node.xhtml"/>                  
      
                  <h:commandButton id="update" 
      
                                value="Update" 
      
                               action="#{nodeHome.update}"
      
                             rendered="#{nodeHome.managed}"/>                  
      
                  <h:commandButton id="delete" 
      
                                value="Delete" 
      
                               action="#{nodeHome.remove}"
      
                             rendered="#{nodeHome.managed}"/>
      
                  <s:button propagation="end" 
      
                                     id="done" 
      
                                  value="Done"
      
                                   view="/enhanced node.xhtml"/>
      
              </div>
      
              
      
          </h:form>
      
          
      
      </ui:define>
      
      
      </ui:composition>