[seam-issues] [JBoss JIRA] (JBSEAM-5067) ConcurrentModificationException in ServerConversationContext.flush()

Marek Schmidt (JIRA) jira-events at lists.jboss.org
Wed Jan 16 06:57:23 EST 2013


    [ https://issues.jboss.org/browse/JBSEAM-5067?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12746147#comment-12746147 ] 

Marek Schmidt commented on JBSEAM-5067:
---------------------------------------

I have been able to reproduce a problem with ExceptionFilter (see the test in https://github.com/maschmid/jboss-seam/commit/dee09efbbf9a79b64d7954dfffa38924920ee7c7 ), but with a different stacktrace:

{noformat}
Servlet.service() for servlet Faces Servlet threw exception: java.lang.IllegalStateException: No phase id bound to current thread (make sure you do not have two SeamPhaseListener instances installed)

	at org.jboss.seam.contexts.PageContext.getPhaseId(PageContext.java:163) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.contexts.PageContext.isBeforeInvokeApplicationPhase(PageContext.java:175) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.contexts.PageContext.getCurrentWritableMap(PageContext.java:91) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.contexts.PageContext.remove(PageContext.java:105) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.Component.newInstance(Component.java:2205) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.Component.getInstance(Component.java:2034) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.Component.getInstance(Component.java:1996) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.Component.getInstanceInAllNamespaces(Component.java:2414) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.Component.getValueToInject(Component.java:2366) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.Component.injectAttributes(Component.java:1743) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.Component.inject(Component.java:1561) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.core.BijectionInterceptor.aroundInvoke(BijectionInterceptor.java:61) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.core.ConversationInterceptor.aroundInvoke(ConversationInterceptor.java:65) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:44) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.intercept.JavaBeanInterceptor.interceptInvocation(JavaBeanInterceptor.java:186) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.intercept.JavaBeanInterceptor.invoke(JavaBeanInterceptor.java:93) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.test.integration.faces.ConversationContextFlushTest$TestComponent_$$_javassist_seam_2.equals(ConversationContextFlushTest$TestComponent_$$_javassist_seam_2.java) [classes:]

	at com.sun.faces.context.SessionMap.put(SessionMap.java:138) [jsf-impl-2.1.7-jbossorg-2.jar:]

	at com.sun.faces.context.SessionMap.put(SessionMap.java:61) [jsf-impl-2.1.7-jbossorg-2.jar:]

	at org.jboss.seam.contexts.ServerConversationContext.flush(ServerConversationContext.java:283) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.contexts.Contexts.flushAndDestroyContexts(Contexts.java:410) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.contexts.Lifecycle.endRequest(Lifecycle.java:164) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.web.ExceptionFilter.endWebRequestAfterException(ExceptionFilter.java:89) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:70) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158) [jboss-seam-2.3.1-SNAPSHOT.jar:2.3.1-SNAPSHOT]

	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:280) [jbossweb-7.0.13.Final.jar:]

	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.13.Final.jar:]

	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.13.Final.jar:]

	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.13.Final.jar:]

	at org.jboss.as.jpa.interceptor.WebNonTxEmCloserValve.invoke(WebNonTxEmCloserValve.java:50) [jboss-as-jpa-7.1.1.Final.jar:7.1.1.Final]

	at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:153) [jboss-as-web-7.1.1.Final.jar:7.1.1.Final]

	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.13.Final.jar:]

	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.13.Final.jar:]

	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.13.Final.jar:]

	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:368) [jbossweb-7.0.13.Final.jar:]

	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.13.Final.jar:]

	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:671) [jbossweb-7.0.13.Final.jar:]

	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:930) [jbossweb-7.0.13.Final.jar:]

	at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_35]

{noformat}


Could you perhaps provide a test case or a reproducer so we can be sure this is not a different issue?
                
> ConcurrentModificationException in ServerConversationContext.flush()
> --------------------------------------------------------------------
>
>                 Key: JBSEAM-5067
>                 URL: https://issues.jboss.org/browse/JBSEAM-5067
>             Project: Seam 2
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 2.3.0.Final
>         Environment: JBoss AS 7.1.0.Final (JSF RI 2.1.5)
>            Reporter: Andrey Zhemoytuk
>
> 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]

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list