I’ve a custom ValueExtractor for a wrapper object that keeps data in “data” property as follows:
I’m passing the nodeName parameter as “data” which is the name of the attribute in MyWrapperObject that gets validated. I’m able to do the validation with the above configuration as long as there are not any constraint violation. When a constraint violation occurs I get this exception: JSR-303 validated property 'myTestAttribute' does not have a corresponding accessor for Spring data binding When i debugged the SpringValidatorAdapter.java, I’ve noticed that the ConstraintViolationException has the wrong path and it does not contain the nodeName “data” that I’ve passed in ValueExtractor. Correct patch should be “data.myTestAttribute” but since it is passed as “myTestAttribute” it can’t be accessed from the wrapper object. When I further debugged, I’ve noticed that ValidatorImply.java is not using the nodeName while building BeanValueContext which can be seen from the below image. 
|