tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kirys <ki...@neoteroi.org>
Subject Re: WARNING: No operation matching request path on a full jax-rs app
Date Sun, 05 Jun 2016 19:42:55 GMT
On 05/06/2016 21:20, Romain Manni-Bucau wrote:
> Did you try an ExceptionMapper? It could handle 404 and delegate others.

tried these two without any result:

@Provider
public class EntityNotFoundMapper
      implements ExceptionMapper<EntityNotFoundException> {

    @Override
    public Response toResponse(EntityNotFoundException e) {
       return Response.status(Response.Status.NOT_FOUND).build();
    }
}


@Provider
public class WebApplicationExceptionHandler implements 
ExceptionMapper<WebApplicationException> {

     @Override
     public Response toResponse(WebApplicationException e) {
         return Response.status(Response.Status.NOT_FOUND).build();
     }
}


Mime
View raw message