Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7890427
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:21:05+00:00 2026-06-03T06:21:05+00:00

I received a ConcurrentNodificationException when I implemented a rich:tree with dynamic loading of the

  • 0

I received a ConcurrentNodificationException when I implemented a rich:tree with dynamic loading of the nodes.

I’m using JSF1.2, Tomcat 6.0, RichFaces 3.3.3, and Java 6u31.

in JSF page I have this rich tree component

<rich:tree id="treeAreas" value="#{areaArmazenamento.treeAreas}"
    var="node"
    adviseNodeOpened="#{storageArea.adviseNodeOpenedTreeAreas}"
    adviseNodeSelected="#{storageArea.adviseNodeSelectedTreeAreas}"
    ajaxSubmitSelection="true"
    componentState="#{storageArea.treeAreasState}"
    nodeSelectListener="#{storageArea.selectNodeArea}"
    nodeFace="#{node.type}" similarityGroupingId="true"
    ondragstart="hideContextMenu();" disableKeyboardNavigation="true"
    rightClickSelection="true" toggleOnClick="true" requestDelay="150"
    changeExpandListener="#{storageArea.expandNodeListener}">

In Managed Bean storageArea I’have the code that load nodes, and on first time the method is called the first level of nodes is loaded, when a click in a node the substructure of this node is loaded.

On load the first level is validated the user’s permissions, and this validation use the iterator of list that stores the tree nodes, this validation remove nodes that the user access is denied. some like this:

List<AreaArmazenamento> areas = root.getPastas();
synchronized (areas) {      
    Iterator<AreaArmazenamento> it = areas.iterator();
    while(it.hasNext())
    {
        area = it.next();
        boolean havePermission = ControllerPermission.havePermission(null, area, Permissions.VIEW, false);
        if(!havePermission)
        {
                it.remove();
        }
    }
}

When I click on any node, I select the sub nodes of database and add the substructure in selected node, this working but sometimes on select node is throwed a ConcurrentNodificationException on Hashtable which is in TreeDataModule of Rich Tree.

This is a trace of exception:

Caused by: java.util.ConcurrentModificationException
at java.util.Hashtable$Enumerator.next(Hashtable.java:1031)
at org.richfaces.model.TreeDataModel.doWalk(TreeDataModel.java:136)
at org.richfaces.model.TreeDataModel.doWalk(TreeDataModel.java:154)
at org.richfaces.model.TreeDataModel.doWalk(TreeDataModel.java:154)
at org.richfaces.model.TreeDataModel.walk(TreeDataModel.java:178)
at org.richfaces.component.UITree.walk(UITree.java:422)
at org.richfaces.renderkit.TreeRendererBase.writeContent(TreeRendererBase.java:683)

anything about it may be causing this error? and why?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-03T06:21:06+00:00Added an answer on June 3, 2026 at 6:21 am

    I Found the problem…

      while(it.hasNext())
    {
        area = it.next();
        boolean havePermission = ControllerPermission.havePermission(null, area, Permissions.VIEW, false);
        if(!havePermission)
        {
                it.remove(); //problem here
        }
    }
    

    I was removing items from the list on iteration…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Received a strange error when using secure websockets in Safari with Webbit server. Error
I received homework to make program without casting using constructors so this is my
I received run-time error for string ApplicationContext context = new ClassPathXmlApplicationContext(Beans.xml); java.lang.NoClassDefFoundError: org/springframework/core/env/EnvironmentCapable I
I received the following exception when I was using the Regex class with the
I posted earlier (and received valid answers, thanks) about a problem I had loading
I received the following error when I tried to run a C# WinForms application
We received access to the environment, but I now need to go through the
% Total % Received % Xferd Average Speed Time Time Time Current Dload Upload
I received a Python project (which happens to be a Django project, if that
I received a library from an external developer in form of a well defined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.