Getting com.google.gwt.user.client.rpc.StatusCodeException: 0 in GWT

前端 未结 4 594
清酒与你
清酒与你 2021-02-14 21:29

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         


        
4条回答
  •  感动是毒
    2021-02-14 22:00

    This happens to us if our authentication layer determines that a session has expired and redirects an RPC request to the login page on a different host. Since AJAX requests cant go to a different host, the browser aborts the request and signals status code 0. See https://code.google.com/p/google-web-toolkit/issues/detail?id=2858

    Its crazy too because GWT will throw a StatusCodeException with code 0 even though the HTTP code that appears in Firebug / Chrome Inspector is clearly a 302.

提交回复
热议问题