Ошибка java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.Collection при попытке нажатия на строку в dataGrid

Добрый день!
У меня есть следующий дескриптор экрана:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<view xmlns="http://jmix.io/schema/flowui/view"
      xmlns:c="http://jmix.io/schema/flowui/jpql-condition"
      title="msg://agentListView.title"
      focusComponent="agentsDataGrid">
    <data readOnly="true">
        <collection id="agentsDc"
                    class="ru.ctsg.damdbf.manager.core.entity.Agent">
            <fetchPlan extends="_base"/>
            <loader id="agentsDl">
                <query>
                    <![CDATA[select e from Agent e]]>
                </query>
            </loader>
        </collection>
    </data>
    <facets>
        <dataLoadCoordinator auto="true"/>
        <urlQueryParameters>
            <pagination component="pagination" maxResultsParam="10"/>
        </urlQueryParameters>
        <settings id="settingsFacet"/>
    </facets>
    <actions>
        <action id="selectAction" type="lookup_select"/>
        <action id="discardAction" type="lookup_discard"/>
    </actions>
    <layout>
        <details summaryText="msg://ru.ctsg.damdbf.manager.view.agent/filter" opened="true"
                 classNames="detailsAgentListView">
            <formLayout>
                <responsiveSteps>
                    <responsiveStep minWidth="0em" columns="3"/>
                </responsiveSteps>
                <multiSelectComboBox id="filterNameComboBox" property="name" dataContainer="agentsDc"
                                     label="msg://ru.ctsg.damdbf.manager.view.agent/nameFilter"
                                     width="15em" classNames="filterBox">
                    <itemsQuery escapeValueForLike="true"
                                searchStringFormat="(?i)%${inputString}%">
                        <query>
                            <![CDATA[select e.name from Agent e where e.name
                                 like :searchString escape '\' order by e.name asc]]>
                        </query>
                    </itemsQuery>
                </multiSelectComboBox>
                <multiSelectComboBox id="filterStatusComboBox"
                                     itemsEnum="ru.ctsg.damdbf.manager.core.enums.AgentStatus"
                                     label="msg://ru.ctsg.damdbf.manager.view.agent/statusFilter" width="15em"
                                     classNames="filterBox"/>
                <multiSelectComboBox id="filterHostComboBox" property="host"
                                     label="msg://ru.ctsg.damdbf.manager.view.agent/hostFilter" width="15em"
                                     classNames="filterBox">
                    <itemsQuery escapeValueForLike="true"
                                searchStringFormat="(?i)%${inputString}%">
                        <query>
                            <![CDATA[select e.host from Agent e where e.host
                                 like :searchString escape '\' order by e.host asc]]>
                        </query>
                    </itemsQuery>
                </multiSelectComboBox>
                <dateTimePicker id="filterLastStartDateDateTimePicker" property="lastStartDate"
                                label="msg://ru.ctsg.damdbf.manager.view.agent/lastStartDate"
                                width="15em" classNames="filterBox"/>
                <dateTimePicker id="filterTransitionDateDateTimePicker" property="transitionDate"
                                label="msg://ru.ctsg.damdbf.manager.view.agent/transitionDate" width="15em"
                                classNames="filterBox"/>
            </formLayout>
            <hbox classNames="hboxAgentFilterButton">
                <button id="refreshFilterBtn" action="agentsDataGrid.refresh" classNames="refreshFilterBtn"/>
                <button id="clearFilterBtn" action="agentsDataGrid.clear" classNames="clearFilterBtn"/>
            </hbox>
        </details>
        <hbox id="buttonsPanel" classNames="buttons-panel">
            <button id="startAgentBtn" action="agentsDataGrid.startAgent"/>
            <button id="stopAgentBtn" action="agentsDataGrid.stopAgent"/>
            <button id="removeBtn" action="agentsDataGrid.remove"/>
        </hbox>
        <dataGrid id="agentsDataGrid"
                  width="100%"
                  minHeight="20em"
                  dataContainer="agentsDc"
                  columnReorderingAllowed="true"
                  selectionMode="MULTI">
            <actions>
                <action id="remove" type="list_remove"/>
                <action id="refresh" type="list_refresh" text="msg://ru.ctsg.damdbf.manager.ui.action/Search"
                        icon="SEARCH"/>
                <action id="edit" type="list_edit">
                    <properties>
                        <property name="openMode" value="DIALOG"/>
                    </properties>
                </action>
                <action id="startAgent" type="list_itemTracking"
                        text="msg://ru.ctsg.damdbf.manager.ui.action/StartAgentAction"/>
                <action id="stopAgent" type="list_itemTracking"
                        text="msg://ru.ctsg.damdbf.manager.ui.action/StopAgentAction"/>
                <action id="clear" text="msg://ru.ctsg.damdbf.manager.ui.action/Clear" icon="MINUS_CIRCLE"/>
            </actions>
            <columns resizable="true">
                <column property="name" autoWidth="true"/>
                <column property="host" autoWidth="true"/>
                <column property="status" autoWidth="true"/>
                <column property="transitionDate" autoWidth="true"/>
                <column property="lastStartDate" autoWidth="true"/>
                <column property="description" autoWidth="true" editable="true"/>
            </columns>
        </dataGrid>
        <hbox alignSelf="CENTER">
            <simplePagination id="pagination" dataLoader="agentsDl" itemsPerPageVisible="true"
                              itemsPerPageItems="10, 20, 50, 100" itemsPerPageDefaultValue="10" alignSelf="CENTER"/>
        </hbox>
        <hbox id="lookupActions" visible="false">
            <button id="selectBtn" action="selectAction"/>
            <button id="discardBtn" action="discardAction"/>
        </hbox>
    </layout>
</view>

Во время тестирования добавленных фильтров столкнулся со следующей ошибкой: при нажатии на строку в dataGrid, где свойство selectionMode стоит в значении MULTI, возникает ошибка (на скрине):
image
Плюс к этому кнопки: Запустить, Остановить и Удалить работают неадекватно: при нажатии на выбранную строку в dataGrid они все должны становиться активными, а сейчас почему-то становятся активными 2 из них, причем рандомно. Плюс фильтры также начинают работать некорректно: при выбранной строчке в dataGrid и выборе одного из условий в компоненте multiSelectComboBox получаю такую ошибку:
image
Если снять галочку с выбранной записи в dataGrid, все работает нормально.
Ниже дескриптор экрана, который работает без ошибок: фильтров нет, но при нажатии на выбранную строку в dataGrid никаких ошибок не возникает:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<view xmlns="http://jmix.io/schema/flowui/view"
      xmlns:c="http://jmix.io/schema/flowui/jpql-condition"
      title="msg://agentListView.title"
      focusComponent="agentsDataGrid">
    <data readOnly="true">
        <collection id="agentsDc"
                    class="ru.ctsg.damdbf.manager.core.entity.Agent">
            <fetchPlan extends="_base"/>
            <loader id="agentsDl">
                <query>
                    <![CDATA[select e from Agent e]]>
                </query>
            </loader>
        </collection>
    </data>
    <facets>
        <dataLoadCoordinator auto="true"/>
        <urlQueryParameters>
            <genericFilter component="genericFilter"/>
            <pagination component="pagination" maxResultsParam="10"/>
        </urlQueryParameters>
    </facets>
    <actions>
        <action id="selectAction" type="lookup_select"/>
        <action id="discardAction" type="lookup_discard"/>
    </actions>
    <layout>
        <genericFilter id="genericFilter"
                       dataLoader="agentsDl">
            <properties include=".*"/>
        </genericFilter>
        <hbox id="buttonsPanel" classNames="buttons-panel">
            <button id="startAgentBtn" action="agentsDataGrid.startAgent"/>
            <button id="stopAgentBtn" action="agentsDataGrid.stopAgent"/>
            <button id="removeBtn" action="agentsDataGrid.remove"/>
        </hbox>
        <dataGrid id="agentsDataGrid"
                  width="100%"
                  minHeight="20em"
                  dataContainer="agentsDc"
                  columnReorderingAllowed="true"
                  selectionMode="MULTI">
            <actions>
                <action id="remove" type="list_remove"/>
                <action id="edit" type="list_edit">
                    <properties>
                        <property name="openMode" value="DIALOG"/>
                    </properties>
                </action>
                <action id="startAgent" type="list_itemTracking" text="msg://ru.ctsg.damdbf.manager.ui.action/StartAgentAction"/>
                <action id="stopAgent" type="list_itemTracking" text="msg://ru.ctsg.damdbf.manager.ui.action/StopAgentAction"/>
            </actions>
            <columns resizable="true">
                <column property="host" autoWidth="true"/>
                <column property="status" autoWidth="true"/>
                <column property="transitionDate" autoWidth="true"/>
                <column property="lastStartDate" autoWidth="true"/>
                <column property="description" autoWidth="true" editable="true"/>
            </columns>
        </dataGrid>
        <hbox alignSelf="CENTER">
            <simplePagination id="pagination" dataLoader="agentsDl" itemsPerPageVisible="true" itemsPerPageItems="10, 20, 50, 100" itemsPerPageDefaultValue="10" alignSelf="CENTER"/>
        </hbox>
        <hbox id="lookupActions" visible="false">
            <button id="selectBtn" action="selectAction"/>
            <button id="discardBtn" action="discardAction"/>
        </hbox>
    </layout>
</view>

Вроде бы в дескрипторе никаких изменений, кроме добавления кастомных фильтров не вносил. Stacktrace ни на какие ошибки в моем коде не указывает:

Caused by: java.lang.ClassCastException: class java.lang.String cannot be cast to class java.util.Collection (java.lang.String and java.util.Collection are in module java.base of loader 'bootstrap')
	at io.jmix.flowui.component.multiselectcombobox.JmixMultiSelectComboBox.setTypedValue(JmixMultiSelectComboBox.java:52) ~[jmix-flowui-2.1.2.jar:na]
	at io.jmix.flowui.data.binding.impl.FieldValueBinding.setComponentValue(FieldValueBinding.java:47) ~[jmix-flowui-2.1.2.jar:na]
	at io.jmix.flowui.data.binding.impl.AbstractValueBinding.onValueSourceStateChanged(AbstractValueBinding.java:216) ~[jmix-flowui-2.1.2.jar:na]
	at io.jmix.flowui.kit.event.EventBus.fireEvent(EventBus.java:82) ~[jmix-flowui-kit-2.1.2.jar:na]
	at io.jmix.flowui.data.value.ContainerValueSource.setState(ContainerValueSource.java:217) ~[jmix-flowui-2.1.2.jar:na]
	at io.jmix.flowui.data.value.ContainerValueSource.containerItemChanged(ContainerValueSource.java:223) ~[jmix-flowui-2.1.2.jar:na]
	at io.jmix.core.common.event.EventHub.publish(EventHub.java:172) ~[jmix-core-2.1.2.jar:na]
	at io.jmix.flowui.model.impl.InstanceContainerImpl.fireItemChanged(InstanceContainerImpl.java:167) ~[jmix-flowui-2.1.2.jar:na]
	at io.jmix.flowui.model.impl.CollectionContainerImpl.setItem(CollectionContainerImpl.java:72) ~[jmix-flowui-2.1.2.jar:na]
	at io.jmix.flowui.data.grid.ContainerDataGridItems.setSelectedItem(ContainerDataGridItems.java:93) ~[jmix-flowui-2.1.2.jar:na]
	at io.jmix.flowui.component.delegate.AbstractGridDelegate.notifyDataProviderSelectionChanged(AbstractGridDelegate.java:627) ~[jmix-flowui-2.1.2.jar:na]
	at io.jmix.flowui.component.delegate.AbstractGridDelegate.onSelectionChange(AbstractGridDelegate.java:516) ~[jmix-flowui-2.1.2.jar:na]
	at com.vaadin.flow.component.grid.AbstractGridMultiSelectionModel.lambda$addSelectionListener$c8df87e0$1(AbstractGridMultiSelectionModel.java:295) ~[vaadin-grid-flow-24.1.16.jar:na]
	at com.vaadin.flow.component.ComponentEventBus.fireEventForListener(ComponentEventBus.java:233) ~[flow-server-24.1.21.jar:24.1.21]
	at com.vaadin.flow.component.ComponentEventBus.fireEvent(ComponentEventBus.java:222) ~[flow-server-24.1.21.jar:24.1.21]
	at com.vaadin.flow.component.Component.fireEvent(Component.java:411) ~[flow-server-24.1.21.jar:24.1.21]
	at com.vaadin.flow.component.grid.Grid.access$100(Grid.java:217) ~[vaadin-grid-flow-24.1.16.jar:na]
	at com.vaadin.flow.component.grid.Grid$SelectionMode$2.fireSelectionEvent(Grid.java:367) ~[vaadin-grid-flow-24.1.16.jar:na]
	at com.vaadin.flow.component.grid.AbstractGridMultiSelectionModel.selectFromClient(AbstractGridMultiSelectionModel.java:115) ~[vaadin-grid-flow-24.1.16.jar:na]
	at java.base/java.util.Optional.ifPresent(Optional.java:178) ~[na:na]
	at com.vaadin.flow.component.grid.Grid.select(Grid.java:3308) ~[vaadin-grid-flow-24.1.16.jar:na]
	at jdk.internal.reflect.GeneratedMethodAccessor29.invoke(Unknown Source) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:568) ~[na:na]

Ничего не могу понять. Где возникает ошибка? В какой момент?

UPD: Ошибку получилось локализовать. Если из дескриптора экрана убрать код, который описывает фильтры:

<details summaryText="msg://ru.ctsg.damdbf.manager.view.agent/filter" opened="true"
                 classNames="detailsAgentListView">
            <formLayout>
                <responsiveSteps>
                    <responsiveStep minWidth="0em" columns="3"/>
                </responsiveSteps>
                    <multiSelectComboBox id="filterNameComboBox" property="name"  dataContainer="agentsDc"
                                     label="msg://ru.ctsg.damdbf.manager.view.agent/nameFilter"
                                     width="15em" classNames="filterBox">
                    <itemsQuery escapeValueForLike="true"
                                searchStringFormat="(?i)%${inputString}%">
                        <query>
                            <![CDATA[select e.name from Agent e where e.name
                                 like :searchString escape '\' order by e.name asc]]>
                        </query>
                    </itemsQuery>
                </multiSelectComboBox>
                <multiSelectComboBox id="filterStatusComboBox"
                                     itemsEnum="ru.ctsg.damdbf.manager.core.enums.AgentStatus"
                                     label="msg://ru.ctsg.damdbf.manager.view.agent/statusFilter" width="15em"
                                     classNames="filterBox"/>
                <multiSelectComboBox id="filterHostComboBox" property="host"
                                     label="msg://ru.ctsg.damdbf.manager.view.agent/hostFilter" width="15em"
                                     classNames="filterBox">
                    <itemsQuery escapeValueForLike="true"
                                searchStringFormat="(?i)%${inputString}%">
                        <query>
                            <![CDATA[select e.host from Agent e where e.host
                                 like :searchString escape '\' order by e.host asc]]>
                        </query>
                    </itemsQuery>
                </multiSelectComboBox>
                <dateTimePicker id="filterLastStartDateDateTimePicker" property="lastStartDate"
                                label="msg://ru.ctsg.damdbf.manager.view.agent/lastStartDate"
                                width="15em" classNames="filterBox"/>
                <dateTimePicker id="filterTransitionDateDateTimePicker" property="transitionDate"
                                label="msg://ru.ctsg.damdbf.manager.view.agent/transitionDate" width="15em"
                                classNames="filterBox"/>
            </formLayout>
            <hbox classNames="hboxAgentFilterButton">
                <button id="refreshFilterBtn" action="agentsDataGrid.refresh" classNames="refreshFilterBtn"/>
                <button id="clearFilterBtn" action="agentsDataGrid.clear" classNames="clearFilterBtn"/>
            </hbox>
        </details>

то ошибка исчезает. Получается, что multiSelectComboBox в фильтре ожидает коллекцию, а при выборе строки в dataGrid ему приходит тип String, отсюда и ошибка.

<multiSelectComboBox id="filterNameComboBox" property="name"  dataContainer="agentsDc"
                                     label="msg://ru.ctsg.damdbf.manager.view.agent/nameFilter"
                                     width="15em" classNames="filterBox">
                    <itemsQuery escapeValueForLike="true"
                                searchStringFormat="(?i)%${inputString}%">
                        <query>
                            <![CDATA[select e.name from Agent e where e.name
                                 like :searchString escape '\' order by e.name asc]]>
                        </query>
                    </itemsQuery>
                </multiSelectComboBox>

Можно ли как-то обойти данную ошибку?

Вопрос решился удалением dataContainer из multiSelectComboBox для id="filterNameComboBox"

1 симпатия