cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Charlie Read <>
Subject Re: jira issue #5401; catching ConstraintViolationException; support for "message" parameter in constraint annotations
Date Tue, 25 Feb 2014 17:51:20 GMT
In browsing issue #5401,

it appears as of Nov, 2014, work was still being done on exceptions
triggered by violations of validation constraints (ie, handling

Here are my questions:

* Does the current violation-handler propagate up the "message" encoded in
constraint annotation?  IE, does the message reach the consumer of the API?

For example, if I have:

    public Object getSomething()(@QueryParam("color") @NotNull(message =
"color should be specified") String color) {

will the message "color should be specified" be included in the response

* If there is a constraint violation (Eg, in above example, if
color-parameter is null), where is the
ConstraintViolationException handled? Where can it be intercepted and

I provisioned a ValidationExceptionMapper (using the CXF 3.0-milestone1
release), but when
I triggered a ConstraintViolationException, the toResponse() method could
not detect it.

* I also noticed in issue #5401 that the logic for returned exceptions is
in flux.

Can someone clarify where the logic stands, and specifically what we should
expect in terms of support for message-propagation back to API consumers
(in the event of ConstraintViolationExceptions)?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message