Skip to content

Tag: exceptionmapper

JAX-RS (jersey implementation) ExceptionMapper aren’t catching ConstraintViolationException

I have an ExceptionMapper as a @Provider for handling all of my exceptions. So it is obvious that my class implements ExceptionMapper<Throwable> and we as know, all exceptions are extended Throwable somehow. Now I used jax-rs @NotNull to checking my resources input values to be not null and by some search, I realized it will throw ConstraintViolationException when the annotated