java.util.ConcurrentModificationException on login of any user after adding folderspane in main win #1689


My goal is to use folderspane with some counters on application folders. All works perfectly except of one thing: inserting folderspane by inserting<main:foldersPane id=“foldersPanel” height=“30%”/> in xml for main-window involve “Unable to login” error for any user including admin. If I’ll comment folderspane line in xml everything will be fine and there will be no errors.
So I’m logging in using any user credentials, got an error “Unable to login”. I can click on this error message and get access to main page and everything that I want, except things that are linked with current userSession (for example, some views are based on session$userLogin and all counters on app folders that are based on userLogin, userId are not working). I thought that error was caused by using userLogin in counters on app folders and cleared them out, but it didn’t help.
I’ve checked catalina log and found that user is logged in and then logged out for some reason. Here is the part of catalina log:

17:39:11.802 INFO  c.h.cuba.core.sys.MetadataImpl - Initializing metadata
17:39:12.288 INFO  c.h.cuba.core.sys.MetadataImpl - Metadata initialized in 484ms
17:39:21.921 INFO - Logged in: ef32430f-81cd-abbd-0a85-0d5e36f0c476 [admin]
17:39:23.495 INFO  c.h.c.c.sys.ViewRepositoryClientImpl - Initializing views
17:39:23.704 INFO - Logged out: ef32430f-81cd-abbd-0a85-0d5e36f0c476 [admin]
17:39:23.713 WARN  c.h.c.w.a.loginwindow.AppLoginWindow - Unable to login
java.util.ConcurrentModificationException: null
        at java.util.ArrayList$Itr.checkForComodification( ~[na:1.8.0_121]
        at java.util.ArrayList$ ~[na:1.8.0_121]
        at java.util.Collections$UnmodifiableCollection$ ~[na:1.8.0_121]
        at com.vaadin.server.AbstractClientConnector$1$ ~[vaadin-server-7.7.6.cuba.6.jar:7.7.6.cuba.6]
        at com.vaadin.server.AbstractClientConnector$1$ ~[vaadin-server-7.7.6.cuba.6.jar:7.7.6.cuba.6]
        at com.vaadin.server.AbstractClientConnector.attach( ~[vaadin-server-7.7.6.cuba.6.jar:7.7.6.cuba.6]
        at com.vaadin.ui.AbstractComponent.attach( ~[vaadin-server-7.7.6.cuba.6.jar:7.7.6.cuba.6]
        at com.vaadin.ui.AbstractComponent.setParent( ~[vaadin-server-7.7.6.cuba.6.jar:7.7.6.cuba.6]
        at com.vaadin.ui.AbstractSingleComponentContainer.setContent( ~[vaadin-server-7.7.6.cuba.6.jar:7.7.6.cuba.6]
        at com.vaadin.ui.UI.setContent( ~[vaadin-server-7.7.6.cuba.6.jar:7.7.6.cuba.6]
        at com.haulmont.cuba.web.AppUI.setTopLevelWindow( ~[cuba-web-6.4.2.jar:6.4.2]
        at com.haulmont.cuba.web.WebWindowManager.createTopLevelWindow( ~[cuba-web-6.4.2.jar:6.4.2]
        at com.haulmont.cuba.web.App.createTopLevelWindow( ~[cuba-web-6.4.2.jar:6.4.2]
        at com.haulmont.cuba.web.DefaultApp.connectionStateChanged( ~[cuba-web-6.4.2.jar:6.4.2]
        at com.haulmont.cuba.web.AbstractConnection.fireConnectionListeners( ~[cuba-web-6.4.2.jar:6.4.2]
        at com.haulmont.cuba.web.AbstractConnection.internalLogin( ~[cuba-web-6.4.2.jar:6.4.2]
        at com.haulmont.cuba.web.AbstractConnection.update( ~[cuba-web-6.4.2.jar:6.4.2]
        at com.haulmont.cuba.web.DefaultConnection.login( ~[cuba-web-6.4.2.jar:6.4.2]
        at [cuba-web-6.4.2.jar:6.4.2]
        at [cuba-web-6.4.2.jar:6.4.2]
        at [cuba-web-6.4.2.jar:6.4.2]
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_121]
        at sun.reflect.NativeMethodAccessorImpl.invoke( ~[na:1.8.0_121]
        at sun.reflect.DelegatingMethodAccessorImpl.invoke( ~[na:1.8.0_121]
        at java.lang.reflect.Method.invoke( ~[na:1.8.0_121]
        at com.haulmont.cuba.gui.xml.DeclarativeAction.actionPerform( [cuba-gui-6.4.2.jar:6.4.2]
        at com.haulmont.cuba.web.gui.components.WebButton.performAction( [cuba-web-6.4.2.jar:6.4.2]
        at com.haulmont.cuba.web.gui.components.WebButton.lambda$new$61446b05$1( [cuba-web-6.4.2.jar:6.4.2]


Do you use an extended main window? Could you share your screen XML?

It seems that there is a problem with default folders pane and the additional one. By default folders pane is already added to mainWindow and can be enabled using the application property: cuba.web.foldersPaneEnabled.

See also:

Hi, Yuriy.

Yep, I’m using an extended main window, xml is in attach, line with folderspane is now commented to avoid an error that i’m talking about. In are set:

cuba.web.appFoldersRefreshPeriodSec = 60

ext-mainwindow.xml (4.0K)

I’ve checked your case and everything is fine. You can find my demo project here: There I’ve created an extended main window using Responsive main menu template and added FoldersPane to XML.

What platform version do you use?

Could your share the code of screen controller? It would be better if you attach a small project that illustrates the issue.

I’ve tried that on 6.4.2 and 6.4.3 with the same result.
It seems for me that screen conroller is the same as in your demo project


import com.haulmont.cuba.gui.components.AbstractMainWindow;
import com.haulmont.cuba.gui.components.Embedded;
import com.haulmont.cuba.gui.components.mainwindow.FtsField;

import javax.inject.Inject;
import java.util.Map;

public class ExtAppMainWindow extends AbstractMainWindow {
    private FtsField ftsField;

    private Embedded logoImage;

    public void init(Map<String, Object> params) {


I’ve tried to clone my project to another machine (without DB and setting that I’ve made from app’s administration folder and there is no error. So, it seems that i’ve made some settings that are stored on my machine but are not exported when i’m uploading my project to repo and then downloading it to another machine. Are there some settings that can involve this error?


I’ve reproduced this issue. It occurs when a user opens application and there are application folders and cuba.web.appFoldersRefreshPeriodSec is set. We will fix it in one of the next bugfix versions of release 6.4

Hi, Yuriy.

Thank you very much for the information.

:ticket: See the following issue in our bug tracker: