Uploaded image for project: 'Seam 2'
  1. Seam 2
  2. JBSEAM-5067

ConcurrentModificationException in ServerConversationContext.flush()

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2.3.0.Final
    • Fix Version/s: 2.3.1.CR1
    • Component/s: Core
    • Labels:
      None
    • Environment:

      JBoss AS 7.1.0.Final (JSF RI 2.1.5)

      Description

      The exception fails after render response phase if long running conversation is active and a bean in conversation scope (additions map) has page/conversation/session scoped outjection.
      Latest 2.3.1.CR1-SNAPSHOT (with JBSEAM-5045 fix): The same exception fails in ExceptionFilter after unhandled exception when there is active long running conversation and a component in conversation scope with a page scoped injection.

      The issue is not reproducible if http://java.net/jira/browse/JAVASERVERFACES-1685 is reverted. Call to equals in com.sun.faces.context.SessionMap#put (lines 132-138) introduced with 1685 fix causes injection/outjection to occur:
      boolean doSet = true;
      if (null != value && null != result)

      { doSet = ! result.equals(value); }

      if (doSet)

      { session.setAttribute(key, value); }

      Stacktrace:
      2013-01-09 05:09:26,576 WARN [org.jboss.seam.jsf.SeamPhaseListener] (http--0.0.0.0-8543-1) uncaught exception, passing to exception handler: java.util.ConcurrentModificationException
      at java.util.HashMap$HashIterator.nextEntry(HashMap.java:793) [rt.jar:1.6.0_30]
      at java.util.HashMap$EntryIterator.next(HashMap.java:834) [rt.jar:1.6.0_30]
      at java.util.HashMap$EntryIterator.next(HashMap.java:832) [rt.jar:1.6.0_30]
      at org.jboss.seam.contexts.ServerConversationContext.flush(ServerConversationContext.java:302) [jboss-seam.jar:2.3.0.Final]
      at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:410) [jboss-seam.jar:2.3.0.Final]
      at org.jboss.seam.contexts.FacesLifecycle.endRequest(FacesLifecycle.java:129) [jboss-seam.jar:2.3.0.Final]
      at org.jboss.seam.jsf.SeamPhaseListener.afterRenderResponse(SeamPhaseListener.java:518) [jboss-seam.jar:2.3.0.Final]
      at org.jboss.seam.jsf.SeamPhaseListener.afterServletPhase(SeamPhaseListener.java:248) [jboss-seam.jar:2.3.0.Final]
      at org.jboss.seam.jsf.SeamPhaseListener.afterPhase(SeamPhaseListener.java:195) [jboss-seam.jar:2.3.0.Final]
      at com.sun.faces.lifecycle.Phase.handleAfterPhase(Phase.java:189) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:107) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139) [jsf-impl-2.1.5-jbossorg-1.jar:2.1.5-SNAPSHOT]
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:594) [jboss-jsf-api_2.1_spec-2.0.0.Final.jar:2.0.0.Final]

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                manaRH Marek Novotny
                Reporter:
                a.zhemoytuk Andrey Zhemoytuk
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: