I sometimes/often get this Exception in GWT but don\'t know why:
SEVERE: com.google.gwt.user.client.rpc.StatusCodeException: 0
java.lang.RuntimeException: com.g
-
Although the original poster probably had issues with their network connection I got the same error today inside GWT hosted mode. And not sometimes, but all the time.
I have now figured it out, and I'd like to share it here so other people searching for a sollution to the 0 status code problem can find it.
If you use the Rpc security tokens that GWT provides (as in this explanation: http://www.gwtproject.org/doc/latest/DevGuideSecurityRpcXsrf.html) against cross site scripting but you forget to set the security token for whatever reason then one of the things you might run into is the zero result.
I've designed my webapplication so that most RPC calls are mostly made within a framework. Today I needed to create an RPC service by hand. Forgot to set the RPCToken, got empty response from the server.
Hope this helps somebody out.
- 热议问题