title: Checked remote service exception translated to StatusCodeException in tomcat
body: <p>I've got a GWT app that does regular RPC calls to a RemoteService whose methods may throw a ServiceException:</p>
  
  <pre><code>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);
      }
  }
  </code></pre>
  
  <p>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</p>
  
  <pre><code>com.google.gwt.user.client.rpc.StatusCodeException: 500 The call failed on the server; see server log for details
  </code></pre>
  
  <p>Just as in dev mode, my server logs show the expected exception reason which I logged myself just before throwing the ServiceException.</p>
  
  <p>I've looked this up in google but could not find anything relevant.</p>
  
  <p>(I'm working on Mac OS X Lion with GWT 2.4, java 1.6 and Tomcat 7.0.16)</p>