title: toResponse in jersey ExceptionMapper does not get invoked
body: <p>So I'm building a web application, we are using JPA and Jersey to consume/produces JSON data.</p>
  
  <p>I have a custom "EntityException" aswell as a custom "EntityExceptionMapper"</p>
  
  <p>Here's the mapper:</p>
  
  <pre><code>  @Provider
  public class EntityExceptionMapper implements ExceptionMapper&lt;EntityException&gt; {
  
      public EntityExceptionMapper() {
          System.out.println("Mapper created");
      }
  
      @Override
      public Response toResponse(EntityException e) {
          System.out.println("This doesnt print!");
          return Response.serverError().build();
      }
  }
  </code></pre>
  
  <p>My Exception:</p>
  
  <pre><code>public class EntityException extends Exception implements Serializable{
  
    public EntityException(String message) {
        super(message);
        System.out.println("This prints...");
    }
  
  }
  </code></pre>
  
  <p>And I'm calling it from a REST call:</p>
  
  <pre><code>@POST
  @Path("/test")
  @Produces(MediaType.APPLICATION_JSON)
  public String test() throws EntityException{
      throw new EntityException("This needs to be send as response!!");
      //return "test";
  }
  </code></pre>
  
  <p>My problem is that, when the above exception is thrown, I get in the constructor (prints: "This prints...") Edit: I also get the: "Mapper created!"</p>
  
  <p>But my response is empty, and I don't get to the sys out of my toResponse method. This is really similar to the example on the jersey website: </p>
  
  <p><a href="https://jersey.java.net/nonav/documentation/1.12/jax-rs.html#d4e435" rel="noreferrer">https://jersey.java.net/nonav/documentation/1.12/jax-rs.html#d4e435</a> </p>
  
  <p>What am I missing??</p>