Threaded View

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Jul 2011
    Posts
    25
    Vote Rating
    1
    IgyBoy is on a distinguished road

      0  

    Default Paging grid with RequestFactory and related entity - doesn't load related entity

    Paging grid with RequestFactory and related entity - doesn't load related entity


    Hi all,

    i have a problem with paging request factory grid.
    If I try to fetch entities that have related entities(lazily loaded) through request factory,and show results on paging grid, i run into a problem.
    The implementation is similar to this:
    http://www.sencha.com/examples/#Exam...estfactorygrid
    I have included the "with("partner") statment on request context,but according to backing database logs, partners(related entity) were never loaded from database.If I leave the PropertyAccess as is, and only replace paging loaders and proxies with straightforwart call to fire() the request to server, I get everything working as expected.
    "partner" entities are loaded as expected.
    Is there anything that I missed?
    part of the application code:



    Entity proxy:
    Code:
    @ProxyFor(value=Kupac.class, locator=EntityLocator.class)
    public interface KupacProxy extends EntityProxy {
    
        Long getVersion();
        
        Integer getId() ;
        void setId(Integer id);
        
        //nested entity
    PartnerProxy getPartner();
        void setPartner(PartnerProxy partner);
        
        String getOib();
        void setOib(String oib);
        
        String getImePrezime();
        void setImePrezime(String imePrezime);
        
        String getAdresa();
        void setAdresa(String adresa);
        
        String getMjesto();
        void setMjesto(String mjesto);
        
        Boolean getAktivan();
        void setAktivan(Boolean aktivan);
        
        String getDefaultBrojKartice();
        void setDefaultBrojKartice(String defaultBrojKartice);
        
        Date getDatumOtvaranja();
        void setDatumOtvaranja(Date datumOtvaranja);
        
        //Set<KarticaProxy> getKarticas();
        //void setKarticas(Set<KarticaProxy> karticas);
        
    }
    Code:
    Code:
        public interface KupacProxyProperties extends PropertyAccess<KupacProxy>{
            ModelKeyProvider<KupacProxy> id();
            ValueProvider<KupacProxy, String> oib();
            ValueProvider<KupacProxy, String> imePrezime();
            ValueProvider<KupacProxy, String> adresa();
            ValueProvider<KupacProxy, String> mjesto();
    //this property fails,it doesn't load related entity "partner"
    @Path("partner.naziv")
    ValueProvider<KupacProxy, String> partner();
            ValueProvider<KupacProxy, Boolean> aktivan();
            ValueProvider<KupacProxy, String> defaultBrojKartice();
            ValueProvider<KupacProxy, Date> datumOtvaranja();
        }
    Code:
    ctx = Kvitto_Card_Manager.KvittoRF.KupacRequest();
            RequestFactoryProxy<FilterPagingLoadConfig, PagingLoadResult<KupacProxy>> proxy=new RequestFactoryProxy<FilterPagingLoadConfig, PagingLoadResult<KupacProxy>>() {
                @Override
                public void load(FilterPagingLoadConfig loadConfig, Receiver<? super PagingLoadResult<KupacProxy>> receiver) {
                    List<SortInfo> sortInfo = createRequestSortInfo(ctx, loadConfig.getSortInfo());
                    List<FilterConfig> filterConfig = createRequestFilterConfig(ctx, loadConfig.getFilters());
    
    //notice the "with" parameter is included
                    ((KupacRequest)ctx).getKupci(loadConfig.getOffset(), loadConfig.getLimit(), sortInfo, filterConfig).with("partner").to(receiver);
                    
                    ctx.fire();
                }
            };
    
            
            Kupacloader = new PagingLoader<FilterPagingLoadConfig, PagingLoadResult<KupacProxy>>(proxy) 
            {
                @Override
                protected FilterPagingLoadConfig newLoadConfig() {
                    return new FilterPagingLoadConfigBean();}
                };
    Error:
    15:31:23.382 [ERROR] [kvitto_card_manager] Uncaught exception escaped
    com.google.web.bindery.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:387)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$5.onTransportSuccess(AbstractRequestContext.java:1108)
    at com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
    at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
    at java.lang.Thread.run(Thread.java:679)
    Caused by: com.google.gwt.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses
    at com.google.gwt.event.shared.EventBus.castFireEvent(EventBus.java:69)
    at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:57)
    at com.sencha.gxt.data.shared.loader.Loader.fireEvent(Loader.java:207)
    at com.sencha.gxt.data.shared.loader.PagingLoader.onLoadSuccess(PagingLoader.java:129)
    at com.sencha.gxt.data.shared.loader.PagingLoader.onLoadSuccess(PagingLoader.java:1)
    at com.sencha.gxt.data.shared.loader.Loader$1.onSuccess(Loader.java:228)
    at com.sencha.gxt.data.shared.loader.RequestFactoryProxy$1.onSuccess(RequestFactoryProxy.java:36)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequest.onSuccess(AbstractRequest.java:129)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:354)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$5.onTransportSuccess(AbstractRequestContext.java:1108)
    at com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
    at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
    at java.lang.Thread.run(Thread.java:679)
    Caused by: com.google.gwt.event.shared.UmbrellaException: One or more exceptions caught, see full set in UmbrellaException#getCauses
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:129)
    at com.sencha.gxt.data.shared.Store.fireEvent(Store.java:609)
    at com.sencha.gxt.data.shared.ListStore.replaceAll(ListStore.java:290)
    at com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding.onLoad(LoadResultListStoreBinding.java:39)
    at com.sencha.gxt.data.shared.loader.LoadEvent.dispatch(LoadEvent.java:77)
    at com.sencha.gxt.data.shared.loader.LoadEvent.dispatch(LoadEvent.java:1)
    at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:52)
    at com.google.gwt.event.shared.EventBus.castFireEvent(EventBus.java:67)
    at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:57)
    at com.sencha.gxt.data.shared.loader.Loader.fireEvent(Loader.java:207)
    at com.sencha.gxt.data.shared.loader.PagingLoader.onLoadSuccess(PagingLoader.java:129)
    at com.sencha.gxt.data.shared.loader.PagingLoader.onLoadSuccess(PagingLoader.java:1)
    at com.sencha.gxt.data.shared.loader.Loader$1.onSuccess(Loader.java:228)
    at com.sencha.gxt.data.shared.loader.RequestFactoryProxy$1.onSuccess(RequestFactoryProxy.java:36)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequest.onSuccess(AbstractRequest.java:129)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:354)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$5.onTransportSuccess(AbstractRequestContext.java:1108)
    at com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
    at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
    at java.lang.Thread.run(Thread.java:679)
    Caused by: java.lang.NullPointerException: null
    at kvitto.cardmanager.shared.KupacProxy_partner_naziv_ValueProviderImpl.getValue(KupacProxy_partner_naziv_ValueProviderImpl.java:6)
    at kvitto.cardmanager.shared.KupacProxy_partner_naziv_ValueProviderImpl.getValue(KupacProxy_partner_naziv_ValueProviderImpl.java:1)
    at com.sencha.gxt.widget.core.client.grid.GridView.getRenderedValue(GridView.java:1677)
    at com.sencha.gxt.widget.core.client.grid.GridView.doRender(GridView.java:1390)
    at com.sencha.gxt.widget.core.client.grid.GridView.renderRows(GridView.java:2566)
    at com.sencha.gxt.widget.core.client.grid.GridView.refresh(GridView.java:839)
    at com.sencha.gxt.widget.core.client.grid.GridView.onDataChanged(GridView.java:2275)
    at com.sencha.gxt.widget.core.client.grid.GridView$10.onDataChange(GridView.java:1990)
    at com.sencha.gxt.data.shared.event.StoreDataChangeEvent.dispatch(StoreDataChangeEvent.java:105)
    at com.sencha.gxt.data.shared.event.StoreDataChangeEvent.dispatch(StoreDataChangeEvent.java:1)
    at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:127)
    at com.sencha.gxt.data.shared.Store.fireEvent(Store.java:609)
    at com.sencha.gxt.data.shared.ListStore.replaceAll(ListStore.java:290)
    at com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding.onLoad(LoadResultListStoreBinding.java:39)
    at com.sencha.gxt.data.shared.loader.LoadEvent.dispatch(LoadEvent.java:77)
    at com.sencha.gxt.data.shared.loader.LoadEvent.dispatch(LoadEvent.java:1)
    at com.google.gwt.event.shared.GwtEvent.dispatch(GwtEvent.java:1)
    at com.google.web.bindery.event.shared.EventBus.dispatchEvent(EventBus.java:40)
    at com.google.web.bindery.event.shared.SimpleEventBus.doFire(SimpleEventBus.java:193)
    at com.google.web.bindery.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:88)
    at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:52)
    at com.google.gwt.event.shared.EventBus.castFireEvent(EventBus.java:67)
    at com.google.gwt.event.shared.SimpleEventBus.fireEvent(SimpleEventBus.java:57)
    at com.sencha.gxt.data.shared.loader.Loader.fireEvent(Loader.java:207)
    at com.sencha.gxt.data.shared.loader.PagingLoader.onLoadSuccess(PagingLoader.java:129)
    at com.sencha.gxt.data.shared.loader.PagingLoader.onLoadSuccess(PagingLoader.java:1)
    at com.sencha.gxt.data.shared.loader.Loader$1.onSuccess(Loader.java:228)
    at com.sencha.gxt.data.shared.loader.RequestFactoryProxy$1.onSuccess(RequestFactoryProxy.java:36)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequest.onSuccess(AbstractRequest.java:129)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$StandardPayloadDialect.processPayload(AbstractRequestContext.java:354)
    at com.google.web.bindery.requestfactory.shared.impl.AbstractRequestContext$5.onTransportSuccess(AbstractRequestContext.java:1108)
    at com.google.web.bindery.requestfactory.gwt.client.DefaultRequestTransport$1.onResponseReceived(DefaultRequestTransport.java:136)
    at com.google.gwt.http.client.Request.fireOnResponseReceived(Request.java:287)
    at com.google.gwt.http.client.RequestBuilder$1.onReadyStateChange(RequestBuilder.java:395)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessagesWhileWaitingForReturn(BrowserChannelServer.java:337)
    at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:218)
    at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:136)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:561)
    at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:269)
    at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeObject(JavaScriptHost.java:91)
    at com.google.gwt.core.client.impl.Impl.apply(Impl.java)
    at com.google.gwt.core.client.impl.Impl.entry0(Impl.java:213)
    at sun.reflect.GeneratedMethodAccessor35.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:616)
    at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:103)
    at com.google.gwt.dev.shell.MethodDispatch.invoke(MethodDispatch.java:71)
    at com.google.gwt.dev.shell.OophmSessionHandler.invoke(OophmSessionHandler.java:172)
    at com.google.gwt.dev.shell.BrowserChannelServer.reactToMessages(BrowserChannelServer.java:292)
    at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:546)
    at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:363)
    at java.lang.Thread.run(Thread.java:679)
    Last edited by IgyBoy; 1 Nov 2012 at 6:38 AM. Reason: included error info

Thread Participants: 1

Tags for this Thread

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar