All throws from the server go through ServerUtil.throwIOException, so play around with that to create the appropriate SQLException (wrapped by a DoNotRetryException) from anything derived from ConstraintViolationException. Would that help?