[JBoss JIRA] Created: (RF-7234) Bean Validation doesn't work without groups
by Juergen Zimmermann (JIRA)
Bean Validation doesn't work without groups
-------------------------------------------
Key: RF-7234
URL: https://jira.jboss.org/jira/browse/RF-7234
Project: RichFaces
Issue Type: Patch
Affects Versions: 3.3.1
Reporter: Juergen Zimmermann
When using Bean Validation for POJO classes without groups I get the stacktrace below. This fix is related to line 83 in the file org/richfaces/validator/BeanValidator.java
ADD TO THE IF STATEMENT THIS ELSE BRANCH:
else groups = new Class<?>[0];
Stacktrace when having no group:
Caused by: java.lang.IllegalArgumentException: null passed as group name
at org.hibernate.validation.engine.ValidatorImpl.determineGroupExecutionOrder(ValidatorImpl.java:161)
at org.hibernate.validation.engine.ValidatorImpl.validateProperty(ValidatorImpl.java:124)
at org.richfaces.validator.BeanValidator.validate(BeanValidator.java:41)
at org.richfaces.validator.ObjectValidator$ValidationResolver.setValue(ObjectValidator.java:411)
at org.apache.el.parser.AstValue.setValue(AstValue.java:142)
at org.apache.el.ValueExpressionImpl.setValue(ValueExpressionImpl.java:249)
at com.sun.facelets.el.TagValueExpression.setValue(TagValueExpression.java:93)
at org.richfaces.validator.ObjectValidator.validate(ObjectValidator.java:117)
at org.richfaces.validator.FacesBeanValidator.validate(FacesBeanValidator.java:101)
at org.richfaces.component.html.HtmlInputText.validateValue(HtmlInputText.java:52)
at javax.faces.component.UIInput.validate(UIInput.java:875)
at javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
at javax.faces.component.UIInput.processValidators(UIInput.java:672)
at org.ajax4jsf.component.UIAjaxRegion$2.invokeContextCallback(UIAjaxRegion.java:59)
at org.ajax4jsf.component.ContextCallbackWrapper.invokeContextCallback(ContextCallbackWrapper.java:44)
at javax.faces.component.UIComponent.invokeOnComponent(UIComponent.java:711)
... 47 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
15 years, 6 months