@Provider
class EntityExistsExceptionMapper implements
ExceptionMapper<EntityExistsException> {


public Response toResponse(EntityExistsException exception) {
return Response.status(Status.INTERNAL_SERVER_ERROR).entity(exception.getMessage())
		.build();
}

}

