Typically, ExceptionMapper used to catch exceptions, log them, and return customized error messages.
However, although JAX-RS provides a NotFoundException in its api, implementations (Jeresy, CXF, ...) provide their own NotFoundException (e.g. com.sun.jersey.api.NotFoundException ), which does not extend JAX-RS.
Leaving us with the only option of having code implementation in our concrete implementation. This makes the task harder if you want to switch implementations.
Is there any other way to do this in order to avoid dependency on a particular implementation?
source share