Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Class Cast Exception when using dsresponse.setData()

$
0
0
I have attached ds.xml file and java file SmartGWT.java which is called on module load and LoginDMI.In which I am Writing own code for fetching.
When I do response.getData() in SmartGwt.java then i get this stack trace.

13:54:04.830 [ERROR] [smartgwt] Uncaught exception escaped

java.lang.ClassCastException: java.lang.String cannot be cast to com.google.gwt.core.client.JavaScriptObject
at com.smartgwt.client.util.JSOHelper.getAttributeAsJ avaScriptObject(JSOHelper.java)
at com.smartgwt.client.core.DataClass.getAttributeAsJ avaScriptObject(DataClass.java:236)
at com.smartgwt.client.data.DSResponse.getData(DSResp onse.java:260)
at com.wipro.SmartGWTProject.client.SmartGWT$1$1.exec ute(SmartGWT.java:122)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(Meth odAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(Met hodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invok e(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reac tToMessagesWhileWaitingForReturn(BrowserChannelSer ver.java:337)
at com.google.gwt.dev.shell.BrowserChannelServer.invo keJavascript(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.invokeNativeO bject(ModuleSpace.java:269)
at com.google.gwt.dev.shell.JavaScriptHost.invokeNati veObject(JavaScriptHost.java:91)
at com.google.gwt.core.client.impl.Impl.apply(Impl.ja va)
at com.google.gwt.core.client.impl.Impl.entry0(Impl.j ava:213)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(Meth odAdaptor.java:103)
at com.google.gwt.dev.shell.MethodDispatch.invoke(Met hodDispatch.java:71)
at com.google.gwt.dev.shell.OophmSessionHandler.invok e(OophmSessionHandler.java:172)
at com.google.gwt.dev.shell.BrowserChannelServer.reac tToMessages(BrowserChannelServer.java:292)
at com.google.gwt.dev.shell.BrowserChannelServer.proc essConnection(BrowserChannelServer.java:546)
at com.google.gwt.dev.shell.BrowserChannelServer.run( BrowserChannelServer.java:363)
at java.lang.Thread.run(Thread.java:662)


Please help me administrator.I want to return data from DMI.but whenever I do getData() i get class cast exception.I am not understanding why is this happening

Attached Files
File Type: java SmartGWT.java (5.0 KB)
File Type: java LoginDMI.java (421 Bytes)
File Type: xml SmartGWT.gwt.xml (813 Bytes)
File Type: xml login.ds.xml (657 Bytes)

Viewing all articles
Browse latest Browse all 4756

Latest Images

Trending Articles



Latest Images