title: Cxf exception mapper not being invoked
body: <p>I have created a custom exception and I have an exception mapper that I want to be invoked when my exception is thrown, so that I can return proper http return codes and messages, but for some reason it doesn't work for my exception.</p>
  
  <p>Here is the relevant code</p>
  
  <p>My Exception class:</p>
  
  <pre><code>public class MyException extends ApplicationRuntimeException
  {
  
      private static final long serialVersionUID = 1L;
  
      public MyException ()
      {
          super();
      }
  
      public MyException (String message)
      {
          super(message);
      }
  
      public MyException (String message, ErrorCode errorCode)
      {
          super(message, errorCode);
      }
  
      public MyException (Throwable t)
      {   
          super(t);
      }
  
      public MyException (String message, Throwable t)
      {
          super(message, t);
      }
  
  }
  </code></pre>
  
  <p>My exception mapper class</p>
  
  <pre><code>@Provider
  public class MyExceptionMapper implements ExceptionMapper&lt;Exception&gt;
  {
      @Override
      public Response toResponse(Exception exception)
      {
          //code
          return response;
      }
  }
  </code></pre>
  
  <p>cxf-config</p>
  
  <pre><code>&lt;jaxrs:server id="serviceId" address="/"&gt;
          &lt;jaxrs:providers&gt;
              &lt;bean class="com.package.MyExceptionMapper"/&gt;
          &lt;/jaxrs:providers&gt;
  &lt;/jaxrs:server&gt;
  </code></pre>
  
  <p>This is essentially what my code is like, is there anything I'm missing or any other information I need to provide in order to resolve this issue?</p>
  
  <p>The exception and exception mapper are located in two different projects, but I don't think that should matter because they are both in the class path.</p>
  
  <p>Thanks</p>