I’ve got a GWT app that does regular RPC calls to a RemoteService whose methods may throw a ServiceException:
public class ServiceException extends Exception implements java.io.Serializable {
private static final long serialVersionUID = 1L;
public ServiceException() {}
public ServiceException(final Throwable cause) {
super(cause);
}
public ServiceException(final String errorMsg) {
super(errorMsg);
}
}
This works perfectly fine in development mode where I get the expected exception messages in my onFailure async callback but when I compile the app and deploy it to tomcat my exception gets translated to
com.google.gwt.user.client.rpc.StatusCodeException: 500 The call failed on the server; see server log for details
Just as in dev mode, my server logs show the expected exception reason which I logged myself just before throwing the ServiceException.
I’ve looked this up in google but could not find anything relevant.
(I’m working on Mac OS X Lion with GWT 2.4, java 1.6 and Tomcat 7.0.16)
Stupid mistake. I finally figured out that the problem came from an accidental typo in the configuration of the java obfuscator I am using. Because of that my class name was renamed when building the war that I was deploying in tomcat.