2 Replies Latest reply on Mar 16, 2009 12:57 PM by Andrew Lindley

    richfaces TreeDataModel throws ConcurrentModificationExcepti

    Andrew Lindley Newbie

      A java.util.ConcurrentModificationException error is thrown by the org.richfaces.model:TreeDataModel that uses a java.util.LinkedHashMap.

      It's thrown when a user drops several double-click commands on a given <rich:treeNode> that's backed by <a4j:support>. Some part of the

      <rich:treeNode type="leaf" dragType="props">
       <rich:dndParam name="label" type="drag">property: #{item.name}</rich:dndParam>
       <a4j:support event="ondblclick" actionListener="#{treeDndBean.processPropertyDblClick}" reRender="selprops" eventsQueue="foo"/>
       <h:outputText value="#{item.name}"/>
       </rich:treeNode>


      13:26:58,821 WARN [lifecycle] /WEB-INF/templates/tree_browser.xhtml @63,97 nodeSelectListener="#{treeDndBean.processSelection}": java.lang.IllegalStateException: No tree element available or row key not set!
      13:27:01,572 WARN [lifecycle] java.util.ConcurrentModificationException
      javax.faces.FacesException: java.util.ConcurrentModificationException
       at org.ajax4jsf.component.UIDataAdaptor.iterate(UIDataAdaptor.java:1045)
       at org.ajax4jsf.component.UIDataAdaptor.processDecodes(UIDataAdaptor.java:1134)
       at org.richfaces.component.UITree.processDecodes(UITree.java:461)
       at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1001)
       at javax.faces.component.UIComponentBase.processDecodes(UIComponentBase.java:1001)
       at org.ajax4jsf.component.UIAjaxForm.processDecodes(UIAjaxForm.java:63)
       at org.ajax4jsf.component.AjaxViewRoot$1.invokeContextCallback(AjaxViewRoot.java:388)
       at org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:235)
       at org.ajax4jsf.component.AjaxViewRoot.processDecodes(AjaxViewRoot.java:405)
       at com.sun.faces.lifecycle.ApplyRequestValuesPhase.execute(ApplyRequestValuesPhase.java:101)
       at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
       at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:154)
       at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:260)
       at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:366)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:493)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:147)
       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:524)
       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.josso.tc55.agent.SSOAgentValve.invoke(SSOAgentValve.java:541)
       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: java.util.ConcurrentModificationException
       at java.util.LinkedHashMap$LinkedHashIterator.nextEntry(LinkedHashMap.java:365)
       at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:384)
       at java.util.LinkedHashMap$EntryIterator.next(LinkedHashMap.java:383)
       at org.richfaces.model.TreeDataModel.doWalk(TreeDataModel.java:133)
       at org.richfaces.model.TreeDataModel.doWalk(TreeDataModel.java:157)
       at org.richfaces.model.TreeDataModel.walk(TreeDataModel.java:181)
       at org.richfaces.model.CacheableTreeDataModel.walk(CacheableTreeDataModel.java:131)
       at org.richfaces.model.AbstractTreeDataModel.walk(AbstractTreeDataModel.java:58)
       at org.ajax4jsf.component.UIDataAdaptor.walk(UIDataAdaptor.java:1127)
       at org.ajax4jsf.component.UIDataAdaptor.iterate(UIDataAdaptor.java:1043)