GWT AsyncCallback failing

214 views
Skip to first unread message

NeeravA

unread,
Nov 23, 2009, 5:28:12 PM11/23/09
to Google Web Toolkit
I call a GWT server method which executes perfectly and returns the
desired object. But the on return the AsyncCallback enters onFailure
method. There is no exception on the server end. On the client side I
get the following Throwable exception.

com.google.gwt.user.client.rpc.StatusCodeException: The call failed on
the server; see server log for details
at
com.google.gwt.user.client.rpc.impl.RequestCallbackAdapter.onResponseReceived
(RequestCallbackAdapter.java:192)
at com.google.gwt.http.client.Request.fireOnResponseReceivedImpl
(Request.java:264)
at com.google.gwt.http.client.Request.fireOnResponseReceivedAndCatch
(Request.java:236)
at com.google.gwt.http.client.Request.fireOnResponseReceived
(Request.java:227)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.dev.shell.MethodAdaptor.invoke(MethodAdaptor.java:
103)
at com.google.gwt.dev.shell.ie.IDispatchImpl.callMethod
(IDispatchImpl.java:126)
at com.google.gwt.dev.shell.ie.IDispatchProxy.invoke
(IDispatchProxy.java:155)
at com.google.gwt.dev.shell.ie.IDispatchImpl.Invoke
(IDispatchImpl.java:294)
at com.google.gwt.dev.shell.ie.IDispatchImpl.method6
(IDispatchImpl.java:194)
at org.eclipse.swt.internal.ole.win32.COMObject.callback6
(COMObject.java:117)
at org.eclipse.swt.internal.win32.OS.DispatchMessageW(Native Method)
at org.eclipse.swt.internal.win32.OS.DispatchMessage(OS.java:1925)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2966)
at com.google.gwt.dev.SwtHostedModeBase.processEvents
(SwtHostedModeBase.java:235)
at com.google.gwt.dev.HostedModeBase.pumpEventLoop
(HostedModeBase.java:558)
at com.google.gwt.dev.HostedModeBase.run(HostedModeBase.java:405)
at com.google.gwt.dev.HostedMode.main(HostedMode.java:232)


Note: this is occurring in the hosted mode. I checked that the object
returned is Serializable. I dont udnerstand what else could be the
problem. Please suggest few things that can cause this error.

Yozons Support on Gmail

unread,
Nov 23, 2009, 6:32:41 PM11/23/09
to google-we...@googlegroups.com
Be sure there are no null pointer errors and that all classes you serialize also have a no-arg constructor (that one gets me from time to time) even if you don't use it yourself (I have a lot of private constructors just for serialization).

tony,benbrahim

unread,
Nov 30, 2009, 7:38:59 AM11/30/09
to Google Web Toolkit
Does your server side methid return 200 status code?

Sripathi Krishnan

unread,
Nov 30, 2009, 12:57:57 PM11/30/09
to google-we...@googlegroups.com
When something goes wrong on the server, GWT returns a StatusCodeException to the client. It doesn't propagate the exception that occurred on the server side, unless you explicitly declare it.

So how do you find out what went wrong? In your RemoteService implementation, override the method  doUnexpectedFailure() and log the exception. GWT calls this method just before returning to the client.

    @Override
    protected void doUnexpectedFailure(Throwable e)
    {
        LOGGER.error(e, "Unexpected Failure while processing Request");       
    }

--Sri


2009/11/24 NeeravA <neer...@gmail.com>

--

You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-we...@googlegroups.com.
To unsubscribe from this group, send email to google-web-tool...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=.



Reply all
Reply to author
Forward
0 new messages