ICEfaces
  1. ICEfaces
  2. ICE-9447

ConcurrentModificationException in InputRichTextResourceHandler

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.0.0.GA_P01, EE-3.2.0.GA
    • Fix Version/s: EE-3.3.0.GA_P01, 4.0.BETA, 4.0
    • Component/s: ICE-Components
    • Labels:
      None
    • Environment:
      All
    • Assignee Priority:
      P1
    • Salesforce Case Reference:

      Description

      A customer has reported the following issue:

      "under high load we get a ConcurrentModificationException from InputRichTextResourceHandler.calculateMappings().

      The most probable reason for this is that the resource handler as a singleton gets called by the multi-threaded PreRenderViewEvent and thus has to synchronize the access to its variables (in this case allResources, but imageResources is dangerous as well)."
      1. stacktrace.txt
        6 kB
        Arran Mccullough

        Activity

        Hide
        Florian Jung added a comment -
        WARN - org.icefaces.impl.application.ExtendedExceptionHandler:80 - queued exception
        java.util.ConcurrentModificationException
         at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819)
         at java.util.ArrayList$Itr.next(ArrayList.java:791)
         at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler.calculateMappings(InputRichTextResourceHandler.java:148)
         at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler.access$300(InputRichTextResourceHandler.java:37)
         at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler$1.processEvent(InputRichTextResourceHandler.java:78)
         at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108)
         at javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:118)
         at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187)
         at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163)
         at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:303)
         at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)
         at org.jboss.weld.environment.servlet.jsf.ForwardingApplication.publishEvent(ForwardingApplication.java:287)
         at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107)
         at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
         at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219)
         at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
         at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)
         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
         at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
         at java.lang.Thread.run(Thread.java:722)
        
        Show
        Florian Jung added a comment - WARN - org.icefaces.impl.application.ExtendedExceptionHandler:80 - queued exception java.util.ConcurrentModificationException at java.util.ArrayList$Itr.checkForComodification(ArrayList.java:819) at java.util.ArrayList$Itr.next(ArrayList.java:791) at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler.calculateMappings(InputRichTextResourceHandler.java:148) at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler.access$300(InputRichTextResourceHandler.java:37) at com.icesoft.faces.component.inputrichtext.InputRichTextResourceHandler$1.processEvent(InputRichTextResourceHandler.java:78) at javax.faces.event.SystemEvent.processListener(SystemEvent.java:108) at javax.faces.event.ComponentSystemEvent.processListener(ComponentSystemEvent.java:118) at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2187) at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2163) at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:303) at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247) at org.jboss.weld.environment.servlet.jsf.ForwardingApplication.publishEvent(ForwardingApplication.java:287) at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:107) at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101) at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:219) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:647) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99) at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408) at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:722)
        Hide
        Mark Collette added a comment -

        Thank you, that does look like this specific issue. Are you running code from after subversion 37247? That's the revision where this fix should be complete.

        Show
        Mark Collette added a comment - Thank you, that does look like this specific issue. Are you running code from after subversion 37247? That's the revision where this fix should be complete.
        Hide
        Florian Jung added a comment - - edited

        I am using the current snapshot version (compat-3.4.0-20130723.214239-4 and the other artifacts build from this day respectivelly) that is available at http://anonsvn.icesoft.org/repo/maven2/snapshots/org/icefaces/. Unfortunately I have no clue, if revision 37247 has been incorporated into the build, but from the heading when surfing this URL it seems to me as if this is the right build.

        Show
        Florian Jung added a comment - - edited I am using the current snapshot version (compat-3.4.0-20130723.214239-4 and the other artifacts build from this day respectivelly) that is available at http://anonsvn.icesoft.org/repo/maven2/snapshots/org/icefaces/ . Unfortunately I have no clue, if revision 37247 has been incorporated into the build, but from the heading when surfing this URL it seems to me as if this is the right build.
        Hide
        Mark Collette added a comment -

        It looks like the version you have is from July 23rd, and the fix was complete on July 26, so no I don't believe you have the fix.

        Show
        Mark Collette added a comment - It looks like the version you have is from July 23rd, and the fix was complete on July 26, so no I don't believe you have the fix.
        Hide
        Florian Jung added a comment -

        That would explain the exception - thanks for checking and sorry for the inconvenience. Isn't building the snapshot version triggered by commits on a - let's say daily or weekly basis? So I am curious, when the patched version will be available in the repo. Anyway - great work guys. Keep on...

        Show
        Florian Jung added a comment - That would explain the exception - thanks for checking and sorry for the inconvenience. Isn't building the snapshot version triggered by commits on a - let's say daily or weekly basis? So I am curious, when the patched version will be available in the repo. Anyway - great work guys. Keep on...

          People

          • Assignee:
            Arturo Zambrano
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: