title: ExceptionMapper not handling my Exceptions. JBOSS
body: <p>I have a custom <code>ExceptionMapper</code> that catches my custom <code>RuntimeException</code>. The problem is that <code>ExceptionMapper</code> doesn't get invoked when i throw my custom <code>Exception</code>.</p>
  
  <p>I have set <code>@Provider</code> at my <code>ExceptionMapper</code> class and also registered it in <code>web.xml</code> as:</p>
  
  <pre><code>&lt;context-param&gt;
      &lt;param-name&gt;resteasy.providers&lt;/param-name&gt;
      &lt;param-value&gt;com.package.myMapper&lt;/param-value&gt;
  &lt;/context-param&gt;
  </code></pre>
  
  <p>And my mapper is :</p>
  
  <pre><code>import javax.ws.rs.core.Response;
  import javax.ws.rs.ext.ExceptionMapper;
  import javax.ws.rs.ext.Provider;
  
  @Provider
  public class ResponseExceptionMapper implements ExceptionMapper&lt;ResponseException&gt;{
  
      @Override
      public Response toResponse(ResponseException arg0) {
          // TODO Auto-generated method stub
          System.out.println("in my mapper");
          return Response.status(513).entity(arg0.getMessage()).build();  
      }
  
  }
  </code></pre>
  
  <p>My exception:</p>
  
  <pre><code>    public class ResponseException extends RuntimeException {
  
      public ResponseException() {
          super();
      }
  
      public ResponseException(String msg) {
          super(msg);
      }
  
      public ResponseException(String msg, Exception e) {
          super(msg, e);
      }
  }
  </code></pre>
  
  <p>What am I doing wrong?...</p>