Nested Collections of Collectiosn

I have multiple nested collections that I’m trying to access in a single view for my users, and I do not understand what tool I’m supposed to use to approach getting the data. I have a client table with a many to one association with a “manager” table, that manager table has a one to many association with a “phone” table. Then from the “client” table I need to get the list of associated phone numbers for the “manager”. The simplified table layout looks like this:

Table - "client"
uuid
name
refManager

Table - "manager"
uuid
name

Table - "phone"
uuid
number
refManager

Then inside of my client view descriptor I have a fetch plan that includes the “refManager” and the its collection of associated “refPhone”. The assication works correctly from the “manager” view and from the “phone” view, I just do not understand how to then extract it the last step into the “client” view. I though a collection would do this but I cannot seem to draw a deeply nested collection in this way.

All help is appreciated, as I have several relationships like this to draw so my users aren’t as frustrated.

Thank you,
Oran

Hi Oran,

Defining a fetch plan and nested data containers should be enough to display all the data in the root Client detail view.
Something like this:

<data>  
    <instance id="clientDc"  
              class="com.company.app.entity.Client">  
        <fetchPlan extends="_base">  
            <property name="manager" fetchPlan="_base">
	            <property name="phones" fetchPlan="_base"/>
            </property>
        </fetchPlan>  
        <loader id="clientDl"/> 
         
        <instance id="managerDc" property="manager">
	        <collection id="phonesDs" property="phones"/>
        </instance>
    </instance>  
</data>

Regards,
Konstantin

Hi Konstantin,

I’ve been trying that and had some limited success, but I am regularly running into the error of not having a loader for that collection so I get "IllegalArgumentException: Loader ‘refManagerPhoneLoader’ not found.

This has been the same for several attempts at this through several relationship mappings.

Thank you,
Oran

Can you provide a test project that demonstrates the problem?

Hi Konstantin,

The this is the following view descriptor:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<view xmlns="http://jmix.io/schema/flowui/view"
      title="msg://clientDetailView.title">
    <data>
        <instance id="clientDc"
                  class="com.company.alirem.entity.Client">
            <fetchPlan extends="_base">
                <property name="refCm" fetchPlan="_instance_name">
                    <property name="generalNote"/>
                    <property name="refPhone" fetchPlan="_base"/>
                    <property name="refEmail" fetchPlan="_base"/>
                </property>
                <property name="notes" fetchPlan="_base">
                    <property name="refTag" fetchPlan="_base"/>
                </property>
                <property name="clientRegulatoryLog" fetchPlan="_base">
                    <property name="refLogType" fetchPlan="_base"/>
                </property>
            </fetchPlan>
            <loader id="clientDl"/>
            <collection id="refNote" property="notes"/>
            <collection id="refClientRegulatoryLog" property="clientRegulatoryLog"/>
            <instance id="refCmDc" property="refCm">
                <collection id="refCmPhoneDs" property="refPhone"/>
                <collection id="refCmEmailDs" property="refEmail"/>
            </instance>
        </instance>
    </data>
    
    <facets>
        <dataLoadCoordinator auto="true"/>
    </facets>
    
    <actions>
        <action id="saveAction" type="detail_saveClose"/>
        <action id="closeAction" type="detail_close"/>
    </actions>

    <layout>
        <hbox width="90vw">
            <formLayout width="100%">
                <responsiveSteps>
                    <responsiveStep minWidth="0" columns="1"/>
                    <responsiveStep minWidth="30em" columns="6"/>
                </responsiveSteps>
                <formItem>
                    <select property="status" dataContainer="clientDc" colspan="3"/>
                </formItem>
                <formItem>
                    <button id="driveButton" text="Google Drive"/>
                </formItem>
                <formItem>
                    <button id="caretapButton" text="Caretap"/>
                </formItem>
                <formItem>
                    <button id="caretapSalButton" text="SALs"/>
                </formItem>
            </formLayout>
        </hbox>
        <formLayout>
            <responsiveSteps>
                <responsiveStep minWidth="0" columns="1"/>
                <responsiveStep minWidth="80em" columns="2"/>
            </responsiveSteps>
            <formItem>
                <tabSheet>

                    <tab id="clientInfoTab" label="Info">
                        <formLayout dataContainer="clientDc">


                            <textField id="nameFirst" property="nameFirst"
                                       label="First Name"
                                       colspan="1"/>
                            <textField property="nameLast"
                                       label="Last name"
                                       colspan="1"/>
                            <textField property="namePreferred"
                                       label="Preferred Name"
                                       colspan="1"/>
                            <span colspan="1"/>
                            <textField property="nameLegal"
                                       label="Full Legal Name"
                                       colspan="2"/>
                            <datePicker property="dob" label="Date of Birth"/>
                            <passwordField property="pmi" label="PMI"/>
                            <select property="clientPets"/>
                            <checkbox property="smoking" label="Smoking"/>
                        </formLayout>
                    </tab>
                    <tab id="contactTab" label="Contact">
                        <formLayout dataContainer="clientDc" colspan="2">
                            <textArea property="phone" label="Phone Number" colspan="2"/>
                            <textField property="address" label="Address" colspan="2"/>
                            <textArea property="rp" colspan="2" label="Responsible Parties"/>
                            <textArea property="emergencyContact" colspan="2" label="Emergency Contact"/>
                            <entityPicker id="cmPicker" dataContainer="clientDc" property="refCm" label="Case Manager">
                                <actions>
                                    <action id="entityClear" type="entity_clear"/>
                                    <action id="entityLookup" type="entity_lookup">
                                        <properties>
                                            <property name="viewClass"
                                                      value="com.company.alirem.view.cm.CmActiveListView"/>
                                        </properties>
                                    </action>
                                    <action id="entityOpen" type="entity_open"/>
                                </actions>
                            </entityPicker>
                            <span colspan="1"/>
                            <dataGrid id="phonesDataGrid" dataContainer="refCmPhoneDs" minWidth="100px" width="100%">
                                <actions>
                                    <action id="create" type="list_create">
                                        <properties>
                                            <property name="openMode" value="DIALOG"/>
                                        </properties>
                                    </action>
                                    <action id="edit" type="list_edit">
                                        <properties>
                                            <property name="openMode" value="DIALOG"/>
                                        </properties>
                                    </action>
                                </actions>
                                <columns>
                                    <column property="active" autoWidth="true"/>
                                    <column property="number" autoWidth="true"/>
                                    <column property="note" autoWidth="true"/>
                                </columns>
                            </dataGrid>
                            <dataGrid id="emailsDataGrid" dataContainer="refCmEmailDs" minWidth="100px" width="100%">
                                <actions>
                                    <action id="create" type="list_create">
                                        <properties>
                                            <property name="openMode" value="DIALOG"/>
                                        </properties>
                                    </action>
                                    <action id="edit" type="list_edit">
                                        <properties>
                                            <property name="openMode" value="DIALOG"/>
                                        </properties>
                                    </action>
                                </actions>
                                <columns resizable="true">
                                    <column property="active" autoWidth="true"/>
                                    <column property="email" autoWidth="true"/>
                                    <column property="note" autoWidth="true"/>
                                </columns>
                            </dataGrid>


                        </formLayout>

                    </tab>
                    <tab id="regulatoryTab" label="Regulation">
                        <formLayout>
                            <span colspan="2" id="admission245dConcat"/>
                            <dataGrid id="clientRegulatoryLogsDataGrid" dataContainer="refClientRegulatoryLog"
                                      minWidth="100px" width="100%" colspan="2" columnReorderingAllowed="true"
                                      detailsVisibleOnClick="true" dropMode="BETWEEN" multiSort="true"
                                      multiSortOnShiftClickOnly="true" rowsDraggable="true">
                                <actions>
                                    <action id="create" type="list_create" icon="PLUS">
                                        <properties>
                                            <property name="openMode" value="DIALOG"/>
                                        </properties>
                                    </action>
                                    <action id="edit" type="list_edit">
                                        <properties>
                                            <property name="openMode" value="DIALOG"/>
                                        </properties>
                                    </action>
                                </actions>
                                <columns>
                                    <column property="date" autoWidth="true" resizable="true" editable="true"
                                    />
                                    <column property="refLogType.abbreviation" autoWidth="true"
                                            resizable="true" editable="true"/>
                                </columns>
                            </dataGrid>
                        </formLayout>
                    </tab>
                    <tab id="servicesTab" label="Services">
                        <formLayout dataContainer="clientDc" colspan="2">
                            <span colspan="2" height="20pt"/>
                            <span text="Service Agreement" colspan="2" alignSelf="CENTER"
                                  css="text-align: center; font-weight: bold; font-size: 16pt;"/>
                            <hr colspan="2"/>
                            <datePicker property="saStart"
                                        label="SA Start Date"/>
                            <datePicker property="saEnd"
                                        label="SA End Date"/>
                            <textField property="saNumber"
                                       label="SA Number"
                                       colspan="2"/>
                            <span colspan="2" height="20pt"/>
                            <span text="PCA/CFSS" colspan="2" alignSelf="CENTER"
                                  css="text-align: center; font-weight: bold; font-size: 16pt;"/>
                            <hr colspan="2"/>
                            <textField property="pca"
                                       label="PCA"/>
                            <span colspan="2" height="20pt"/>
                            <span text="245D" colspan="2" alignSelf="CENTER"
                                  css="text-align: center; font-weight: bold; font-size: 16pt;"/>
                            <hr colspan="2"/>
                            <textField property="hm"
                                       label="HM"/>
                            <textField property="icls"
                                       label="ICLS"/>
                            <textField property="ihsf"
                                       label="IHSF"/>
                            <textField property="ihsn"
                                       label="IHSN"/>
                            <textField property="ihst"
                                       label="IHST"/>
                            <textField property="ns"
                                       label="NS"/>
                            <textField property="rc"
                                       label="RC"/>
                            <checkbox property="ea"
                                      label="24HRea4"/>
                            <textField property="serviceNote"
                                       label="Service Notes"/>
                        </formLayout>
                    </tab>
                    <tab id="dataTab" label="Data">
                        <formLayout colspan="2" dataContainer="clientDc">
                            <textField property="caretapUsername"/>
                            <textField property="idCaretap"/>
                            <textField property="urlCaretap"/>
                            <textField property="urlCaretapSal"/>
                            <textField property="urlGoogleDrive"/>
                        </formLayout>
                    </tab>
                </tabSheet>
            </formItem>
            <formItem>
                <tabSheet>
                    <tab id="clientNotesTab" label="Notes">
                        <formLayout colspan="2">
                            <dataGrid id="refNoteDataGrid" dataContainer="refNote" colspan="2">
                                <actions>
                                    <action id="noteAdd" type="list_create">
                                        <properties>
                                            <property name="openMode" value="DIALOG"/>
                                        </properties>
                                    </action>
                                    <action id="noteEdit" type="list_edit">
                                        <properties>
                                            <property name="openMode" value="DIALOG"/>
                                        </properties>
                                    </action>
                                </actions>
                                <columns>
                                    <column property="note"/>
                                    <column property="timestamp"/>
                                    <column property="confidentialLevels"/>
                                </columns>
                            </dataGrid>
                        </formLayout>
                    </tab>
                    <tab id="staffListTab" label="Staff">
                        <formLayout colspan="2">
                            <textArea dataContainer="clientDc"
                                      property="otherStaffingInformation"
                                      label="Other Staffing Information"/>
                            <select dataContainer="clientDc"
                                    property="staffingGenderPreferences"
                                    label="Staffing Gender Preferences"/>
                        </formLayout>
                    </tab>
                </tabSheet>
            </formItem>
        </formLayout>
        <hbox id="detailActions">
            <button id="saveAndCloseButton" action="saveAction"/>
            <button id="closeButton" action="closeAction"/>
        </hbox>
    </layout>
</view>

It generates this error

java.lang.IllegalArgumentException: Loader 'refCmPhoneLoader' not found
	at io.jmix.flowui.model.impl.AbstractDataComponentsHolder.getLoader(AbstractDataComponentsHolder.java:72)
	at io.jmix.flowui.sys.autowire.ViewElementsDependencyInjector.getAutowiredInstance(ViewElementsDependencyInjector.java:74)
	at io.jmix.flowui.sys.autowire.AbstractElementsDependencyInjector.doAutowiring(AbstractElementsDependencyInjector.java:56)
	at io.jmix.flowui.sys.autowire.AbstractElementsDependencyInjector.autowire(AbstractElementsDependencyInjector.java:47)
	at io.jmix.flowui.sys.autowire.AutowireManager.autowire(AutowireManager.java:53)
	at io.jmix.flowui.sys.ViewSupport.initView(ViewSupport.java:135)
	at io.jmix.flowui.sys.vaadin.JmixSpringInstantiator.init(JmixSpringInstantiator.java:65)
	at io.jmix.flowui.sys.vaadin.JmixSpringInstantiator.getOrCreate(JmixSpringInstantiator.java:58)
	at com.vaadin.flow.di.Instantiator.createRouteTarget(Instantiator.java:170)
	at io.jmix.flowui.sys.vaadin.JmixSpringInstantiator.createRouteTarget(JmixSpringInstantiator.java:49)
	at com.vaadin.flow.router.internal.AbstractNavigationStateRenderer.lambda$getRouteTarget$1(AbstractNavigationStateRenderer.java:148)
	at java.base/java.util.Optional.orElseGet(Optional.java:364)
	at com.vaadin.flow.router.internal.AbstractNavigationStateRenderer.getRouteTarget(AbstractNavigationStateRenderer.java:147)
	at com.vaadin.flow.router.internal.AbstractNavigationStateRenderer.sendBeforeEnterEventAndPopulateChain(AbstractNavigationStateRenderer.java:502)
	at com.vaadin.flow.router.internal.AbstractNavigationStateRenderer.createChainIfEmptyAndExecuteBeforeEnterNavigation(AbstractNavigationStateRenderer.java:483)
	at com.vaadin.flow.router.internal.AbstractNavigationStateRenderer.handle(AbstractNavigationStateRenderer.java:227)
	at com.vaadin.flow.component.internal.JavaScriptNavigationStateRenderer.handle(JavaScriptNavigationStateRenderer.java:78)
	at com.vaadin.flow.component.UI.handleNavigation(UI.java:2005)
	at com.vaadin.flow.component.UI.navigate(UI.java:1231)
	at io.jmix.flowui.view.navigation.ViewNavigationSupport.navigate(ViewNavigationSupport.java:55)
	at io.jmix.flowui.view.navigation.AbstractNavigationProcessor.lambda$processNavigation$c42b6125$1(AbstractNavigationProcessor.java:86)
	at com.vaadin.flow.component.page.Page.lambda$fetchCurrentURL$fb993594$1(Page.java:537)
	at com.vaadin.flow.component.page.PendingJavaScriptResult.lambda$then$3fde283c$1(PendingJavaScriptResult.java:113)
	at com.vaadin.flow.component.internal.PendingJavaScriptInvocation.complete(PendingJavaScriptInvocation.java:96)
	at com.vaadin.flow.server.communication.UidlWriter.lambda$createReturnValueChannel$d9004ac5$1(UidlWriter.java:320)
	at com.vaadin.flow.internal.nodefeature.ReturnChannelMap.lambda$registerChannel$2a20409b$1(ReturnChannelMap.java:124)
	at com.vaadin.flow.internal.nodefeature.ReturnChannelMap$ChannelImpl.invoke(ReturnChannelMap.java:74)
	at com.vaadin.flow.server.communication.ReturnChannelHandler.handleNode(ReturnChannelHandler.java:78)
	at com.vaadin.flow.server.communication.rpc.AbstractRpcInvocationHandler.handle(AbstractRpcInvocationHandler.java:73)
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocationData(ServerRpcHandler.java:475)
	at com.vaadin.flow.server.communication.ServerRpcHandler.lambda$handleInvocations$5(ServerRpcHandler.java:456)
	at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleInvocations(ServerRpcHandler.java:456)
	at com.vaadin.flow.server.communication.ServerRpcHandler.handleRpc(ServerRpcHandler.java:324)
	at com.vaadin.flow.server.communication.UidlRequestHandler.synchronizedHandleRequest(UidlRequestHandler.java:114)
	at com.vaadin.flow.server.SynchronizedRequestHandler.handleRequest(SynchronizedRequestHandler.java:40)
	at com.vaadin.flow.server.VaadinService.handleRequest(VaadinService.java:1584)
	at com.vaadin.flow.server.VaadinServlet.service(VaadinServlet.java:398)
	at com.vaadin.flow.spring.SpringServlet.service(SpringServlet.java:106)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:632)
	at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:408)
	at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:303)
	at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:267)
	at org.springframework.web.servlet.mvc.ServletForwardingController.handleRequestInternal(ServletForwardingController.java:142)
	at org.springframework.web.servlet.mvc.AbstractController.handleRequest(AbstractController.java:178)
	at org.springframework.web.servlet.mvc.SimpleControllerHandlerAdapter.handle(SimpleControllerHandlerAdapter.java:51)
	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:914)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:547)
	at org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
	at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:614)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:195)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at io.jmix.core.impl.logging.LogMdcFilter.doFilterInternal(LogMdcFilter.java:28)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
	at org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:365)
	at org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:100)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:126)
	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:120)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:131)
	at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:85)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:110)
	at org.springframework.security.web.authentication.rememberme.RememberMeAuthenticationFilter.doFilter(RememberMeAuthenticationFilter.java:101)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:151)
	at org.springframework.security.web.session.ConcurrentSessionFilter.doFilter(ConcurrentSessionFilter.java:129)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:227)
	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:221)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)
	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:117)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
	at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82)
	at org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:374)
	at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233)
	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$3(HandlerMappingIntrospector.java:195)
	at org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
	at org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
	at org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebMvcSecurityConfiguration.java:230)
	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:352)
	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:268)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:100)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.FormContentFilter.doFilterInternal(FormContentFilter.java:93)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:201)
	at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:164)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:140)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:167)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:90)
	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:483)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:115)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:93)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:74)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344)
	at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:384)
	at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
	at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:905)
	at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1741)
	at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1190)
	at org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:659)
	at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
	at java.base/java.lang.Thread.run(Thread.java:1583)

This appears to be a continuing error, I’m on jmix 2.4.

Sorry it took awhile to reply, I just got back from a holidy break.

Thank you,
Oran

Hi Oran,

According to these lines

java.lang.IllegalArgumentException: Loader 'refCmPhoneLoader' not found
	at io.jmix.flowui.model.impl.AbstractDataComponentsHolder.getLoader(AbstractDataComponentsHolder.java:72)
	at io.jmix.flowui.sys.autowire.ViewElementsDependencyInjector.getAutowiredInstance(ViewElementsDependencyInjector.java:74)

you have injected a loader field named refCmPhoneLoader into the controller. But this loader doesn’t exist in the descriptor.

Regards,
Konstantin

Hi Konstantin,

Probably a complete misunderstanding on my part then so pardon what is probably a stupid question.

How am I supposed to use the data collection if I don’t put it into something like a Data Grid which requires a data loader?

Thank you,
Oran

Hi Oran
Check that a loader with id="refCmPhoneLoader" is defined in view XML descriptor.

1 Like

Solution marked above. Long story short, I pulled the wrong version from source control and had a previous implementation of my view controller. That prior version manually altered a parameter to “refCmPhoneLoader”, by doing it correctly as described by Konstantin I removed the unnecessary Loader and kept generating the error. The examples provided by Konstantin work great.

Thank you,
Oran