3 Replies Latest reply on Apr 2, 2013 9:46 AM by mmulligan03

    Concurrent call to the conversation Non ajax request

    mmulligan03

      I've been trying to figure this out for days and I find my self running in circles trying to track down this bug. 


      Here is the scenario:
      I have an admin section responsible for managing users, roles, permissions etc... (I mention this because its the only section of my site that is throwing this error). 


      This section of my site requires the user to have elevated admin privileges, requiring them to reenter their password to enter.  This all works fine.


      Intermittently if a user clicks a link and then within a few seconds of the page loading clicks on another link I'll get the following error:



      2011-11-17 08:16:16,918 WARN  [org.jboss.seam.jsf.SeamPhaseListener] (http-128.181.3.201-8444-11) uncaught exception, passing to exception handler
      org.jboss.seam.ConcurrentRequestTimeoutException: Concurrent call to conversation
              at org.jboss.seam.core.Manager.restoreAndLockConversation(Manager.java:641)
              at org.jboss.seam.core.Manager.restoreConversation(Manager.java:603)
              at org.jboss.seam.jsf.SeamPhaseListener.afterRestoreView(SeamPhaseListener.java:392)
              at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:230)
              at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:196)
              at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:175)
              at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:114)
              at com.sun.faces.lifecycle.RestoreViewPhase.doPhase(RestoreViewPhase.java:102)
              at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
              at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
              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.IdentityFilter.doFilter(IdentityFilter.java:40)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:90)
              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.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:73)
              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)
              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:60)
              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:235)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
              at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
              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:158)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:829)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:598)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:451)
              at java.lang.Thread.run(Thread.java:619)
      2011-11-17 08:16:17,033 ERROR [org.jboss.web.tomcat.service.jca.CachedConnectionValve] (http-128.181.3.201-8444-11) Application error: Faces Servlet did not complete its transaction
      



      Any Ideas how to prevent this error from happening?

        • 1. Re: Concurrent call to the conversation Non ajax request
          mmulligan03

          I've figured out another scenario that is causing this to happen but don't know how to resolve it.


          On a page where there is an ajax validation the validation doesn't finish before the user selects the save button or clicks a link to a different page.  I also get the concurrent conversation call.


          Has anyone else solved this before?


          There are two ways I can think of to fix this. One (and I'd rather not do this) is to disabled all links and buttons on a page while the ajax call is being processed.  The second is to stop/kill any ajax requests currently running or that are in a queue. 


          Any other suggestions or ideas?

          • 2. Re: Concurrent call to the conversation Non ajax request
            mzuidweg

            Did you ever find a solution for this problem? I have the situation now where a user leaves a field with an onchange a:support on it, by clicking on an h:commandButton. The a:support call is not finished before the form submit happens, causing a concurrent call to conversation.

            • 3. Re: Concurrent call to the conversation Non ajax request
              mmulligan03

              The problem we've found was that our ajax requests were simply taking to long to complete causing the concurrent calls. I came across these two articles about speeding up JSF/SEAM applications. Both articles will help understand speeding up your application and making ajax requests come back faster. There are several things you can do to help with this and these articles go over it pretty well I thought.

               

              Speed up your JSF/SEAM App part 1

              Speed up your JSF/SEAM App part 2

               

              The first article talks about speeding up 100 rows in a datatable that are editable rows, something we do very often in our applications.

              The second talks about speeding up our ajax calls. This is important for us to prevent the Concurrent call to Conversation errors but read both they have a lot of good information about SEAM and JSF.

               

              If the ajax support on the inputbox is just doing a validation try adding the @ByPassInterceptors annotaion to the getter for the field. You can also try things like bypassUpdates="true" and/or immediate=true" on the a:support tag.