0 Replies Latest reply on May 24, 2008 1:38 PM by Thiagu Mariappan

    Flush during cascade is dangerous at load testing

    Thiagu Mariappan Novice

      hai every one

      this is my project environment


      jboss seam: 2.1.0.A1
      jboss server:4.2.2.GA


      I my page I display the huge amount of data displayed in the form of table. I fetch those data by using EJP 3 by using PersistenceContext. When more than one person try to access that particular page at a time
      I got following exception


      
      04:59:34,837 WARN  [arjLoggerI18N] [com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator_2] TwoPhaseCoordinator.beforeCompletion - failed for com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple@1c7ee02f
      
      javax.persistence.PersistenceException: org.hibernate.HibernateException: Flush during cascade is dangerous
      
           at org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:629)
      
           at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:524)
      
           at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:114)
      
           at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:247)
      
           at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:86)
      
           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:605)
      
           at org.jboss.seam.jsf.SeamPhaseListener.handleTransactionsAfterPageActions(SeamPhaseListener.java:352)
      
           at org.jboss.seam.jsf.SeamPhaseListener.preRenderPage(SeamPhaseListener.java:571)
      
           at org.jboss.seam.jsf.SeamPhaseListener.beforeRenderResponse(SeamPhaseListener.java:473)
      
           at org.jboss.seam.jsf.SeamPhaseListener.beforeServletPhase(SeamPhaseListener.java:146)
      
           at org.jboss.seam.jsf.SeamPhaseListener.beforePhase(SeamPhaseListener.java:116)
      
           at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:222)
      
           at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      
           at javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      
           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.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:68)
      
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
      
           at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
      
           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:56)
      
           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.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:595)
      
      Caused by: org.hibernate.HibernateException: Flush during cascade is dangerous
      
           at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:996)
      
           at org.hibernate.impl.SessionImpl.managedFlush(SessionImpl.java:338)
      
           at org.hibernate.ejb.AbstractEntityManagerImpl$1.beforeCompletion(AbstractEntityManagerImpl.java:515)
      
           ... 56 more
      
      
      



      How can I fix this exception?


      by
      thiagu.m