Hello all
I am using Smart GWT 2.2 version on ecllipse 3.4 ganymade.
I am creating a Grid by using ListGrid of smart GWT.Now in this grid has three overloaded methods for set data.Which are as follows :
1.setData(ListGridRecord[] data)
2.setData(Record[] data)
3.serData(RecordList data)
Now by using first way it is working properly.But when I tried third way it is giving me a class cast exception.
Exception as below :
17:56:26.054 [ERROR] [nextenders] Uncaught exception escaped
java.lang.ClassCastException: com.smartgwt.client.data.Record cannot be cast to com.smartgwt.client.widgets.grid.ListGridRecord
at com.smartgwt.client.widgets.grid.ListGridRecord.getOrCreateRef(ListGridRecord.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:157)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
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:188)
at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:157)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.smartgwt.client.widgets.BaseWidget.draw(BaseWidget.java)
at com.smartgwt.client.widgets.BaseWidget.getElement(BaseWidget.java:272)
at com.smartgwt.client.widgets.BaseWidget.getElement(BaseWidget.java:244)
at com.gwtext.client.util.DOMUtil.getID(DOMUtil.java:37)
at com.gwtext.client.widgets.Container.add(Container.java:131)
at com.nextenders.client.ui.triad.smartgrid.SmartGWTPanel.initializeControls(SmartGWTPanel.java:75)
at com.nextenders.client.ui.triad.newmvc.ViewNew.initView(ViewNew.java:70)
at com.nextenders.client.ui.triad.newmvc.ControllerNew.handleEvent(ControllerNew.java:60)
at com.nextenders.client.ui.triad.smartgrid.SmartGWTPanel.refreshData(SmartGWTPanel.java:109)
at com.nextenders.client.ui.triad.newmvc.ViewNew.refresh(ViewNew.java:60)
at com.nextenders.client.ui.triad.newmvc.ViewNew.init(ViewNew.java:52)
at com.nextenders.client.ui.triad.newmvc.ViewNew.<init>(ViewNew.java:22)
at com.nextenders.client.ui.triad.smartgrid.SmartGWTPanel.<init>(SmartGWTPanel.java:22)
at com.nextenders.client.ui.util.ViewFactory.getInstance(ViewFactory.java:459)
at com.nextenders.client.ui.history.IndexPageHistoryHandler.onValueChange(IndexPageHistoryHandler.java:76)
at com.nextenders.client.ui.history.HistoryHandler.onValueChange(HistoryHandler.java:100)
at com.google.gwt.event.logical.shared.ValueChangeEvent.dispatch(ValueChangeEvent.java:128)
at com.google.gwt.event.logical.shared.ValueChangeEvent.dispatch(ValueChangeEvent.java:1)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178)
at com.google.gwt.user.client.impl.HistoryImpl.fireEvent(HistoryImpl.java:74)
at com.google.gwt.event.logical.shared.ValueChangeEvent.fire(ValueChangeEvent.java:43)
at com.google.gwt.user.client.impl.HistoryImpl.fireHistoryChangedImpl(HistoryImpl.java:81)
at com.google.gwt.user.client.History.fireCurrentHistoryState(History.java:121)
at com.nextenders.client.NexTendersEntryPoint.onModuleLoad(NexTendersEntryPoint.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:369)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Unknown Source)
I am not getting the where is the problem.Please help
Thanks in advance.
I am using Smart GWT 2.2 version on ecllipse 3.4 ganymade.
I am creating a Grid by using ListGrid of smart GWT.Now in this grid has three overloaded methods for set data.Which are as follows :
1.setData(ListGridRecord[] data)
2.setData(Record[] data)
3.serData(RecordList data)
Now by using first way it is working properly.But when I tried third way it is giving me a class cast exception.
Exception as below :
17:56:26.054 [ERROR] [nextenders] Uncaught exception escaped
java.lang.ClassCastException: com.smartgwt.client.data.Record cannot be cast to com.smartgwt.client.widgets.grid.ListGridRecord
at com.smartgwt.client.widgets.grid.ListGridRecord.getOrCreateRef(ListGridRecord.java:91)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:157)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeObject(ModuleSpace.java:264)
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:188)
at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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:157)
at com.google.gwt.dev.shell.BrowserChannel.reactToMessagesWhileWaitingForReturn(BrowserChannel.java:1713)
at com.google.gwt.dev.shell.BrowserChannelServer.invokeJavascript(BrowserChannelServer.java:165)
at com.google.gwt.dev.shell.ModuleSpaceOOPHM.doInvoke(ModuleSpaceOOPHM.java:120)
at com.google.gwt.dev.shell.ModuleSpace.invokeNative(ModuleSpace.java:507)
at com.google.gwt.dev.shell.ModuleSpace.invokeNativeVoid(ModuleSpace.java:284)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNativeVoid(JavaScriptHost.java:107)
at com.smartgwt.client.widgets.BaseWidget.draw(BaseWidget.java)
at com.smartgwt.client.widgets.BaseWidget.getElement(BaseWidget.java:272)
at com.smartgwt.client.widgets.BaseWidget.getElement(BaseWidget.java:244)
at com.gwtext.client.util.DOMUtil.getID(DOMUtil.java:37)
at com.gwtext.client.widgets.Container.add(Container.java:131)
at com.nextenders.client.ui.triad.smartgrid.SmartGWTPanel.initializeControls(SmartGWTPanel.java:75)
at com.nextenders.client.ui.triad.newmvc.ViewNew.initView(ViewNew.java:70)
at com.nextenders.client.ui.triad.newmvc.ControllerNew.handleEvent(ControllerNew.java:60)
at com.nextenders.client.ui.triad.smartgrid.SmartGWTPanel.refreshData(SmartGWTPanel.java:109)
at com.nextenders.client.ui.triad.newmvc.ViewNew.refresh(ViewNew.java:60)
at com.nextenders.client.ui.triad.newmvc.ViewNew.init(ViewNew.java:52)
at com.nextenders.client.ui.triad.newmvc.ViewNew.<init>(ViewNew.java:22)
at com.nextenders.client.ui.triad.smartgrid.SmartGWTPanel.<init>(SmartGWTPanel.java:22)
at com.nextenders.client.ui.util.ViewFactory.getInstance(ViewFactory.java:459)
at com.nextenders.client.ui.history.IndexPageHistoryHandler.onValueChange(IndexPageHistoryHandler.java:76)
at com.nextenders.client.ui.history.HistoryHandler.onValueChange(HistoryHandler.java:100)
at com.google.gwt.event.logical.shared.ValueChangeEvent.dispatch(ValueChangeEvent.java:128)
at com.google.gwt.event.logical.shared.ValueChangeEvent.dispatch(ValueChangeEvent.java:1)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.fireEvent(HandlerManager.java:65)
at com.google.gwt.event.shared.HandlerManager$HandlerRegistry.access$1(HandlerManager.java:53)
at com.google.gwt.event.shared.HandlerManager.fireEvent(HandlerManager.java:178)
at com.google.gwt.user.client.impl.HistoryImpl.fireEvent(HistoryImpl.java:74)
at com.google.gwt.event.logical.shared.ValueChangeEvent.fire(ValueChangeEvent.java:43)
at com.google.gwt.user.client.impl.HistoryImpl.fireHistoryChangedImpl(HistoryImpl.java:81)
at com.google.gwt.user.client.History.fireCurrentHistoryState(History.java:121)
at com.nextenders.client.NexTendersEntryPoint.onModuleLoad(NexTendersEntryPoint.java:35)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.google.gwt.dev.shell.ModuleSpace.onLoad(ModuleSpace.java:369)
at com.google.gwt.dev.shell.OophmSessionHandler.loadModule(OophmSessionHandler.java:185)
at com.google.gwt.dev.shell.BrowserChannelServer.processConnection(BrowserChannelServer.java:380)
at com.google.gwt.dev.shell.BrowserChannelServer.run(BrowserChannelServer.java:222)
at java.lang.Thread.run(Unknown Source)
I am not getting the where is the problem.Please help
Thanks in advance.
Comment