[hibernate-issues] [Hibernate-JIRA] Resolved: (ANN-511) Two level @Valid annotation doesn't work
Emmanuel Bernard (JIRA)
noreply at atlassian.com
Wed Jan 17 14:37:44 EST 2007
[ http://opensource.atlassian.com/projects/hibernate/browse/ANN-511?page=all ]
Emmanuel Bernard resolved ANN-511:
----------------------------------
Fix Version: 3.2.2
Resolution: Fixed
Assign To: Emmanuel Bernard
Fixed thanks
> Two level @Valid annotation doesn't work
> -----------------------------------------
>
> Key: ANN-511
> URL: http://opensource.atlassian.com/projects/hibernate/browse/ANN-511
> Project: Hibernate Annotations
> Type: Bug
> Components: validator
> Versions: 3.2.1
> Environment: hibernate-annotations 3.2.1.ga
> Reporter: Rakesh Kalra
> Assignee: Emmanuel Bernard
> Fix For: 3.2.2
>
> Original Estimate: 1 hour
> Remaining: 1 hour
>
> I have object depth of 3: Form, Member, Address. I get the following exception when initializing ClassValidator:
> java.lang.NullPointerException
> at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:142)
> at org.hibernate.validator.ClassValidator.createChildValidator(ClassValidator.java:252)
> at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:216)
> at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:149)
> at org.hibernate.validator.ClassValidator.createChildValidator(ClassValidator.java:252)
> at org.hibernate.validator.ClassValidator.initValidator(ClassValidator.java:216)
> at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:134)
> at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:105)
> at org.hibernate.validator.ClassValidator.<init>(ClassValidator.java:97)
> ...
> This works fine with 3.2.0.ga.
> I think the problem is in the following constructor, where instance level "reflectionManager" is not being initialized.
> protected ClassValidator(
> XClass beanXClass, ResourceBundle resourceBundle, MessageInterpolator userInterpolator,
> Map<XClass, ClassValidator> childClassValidators, ReflectionManager reflectionManager
> ) {
> this.beanClass = reflectionManager.toClass( beanXClass );
> this.messageBundle = resourceBundle == null ?
> getDefaultResourceBundle() :
> resourceBundle;
> this.defaultMessageBundle = ResourceBundle.getBundle( DEFAULT_VALIDATOR_MESSAGE );
> this.userInterpolator = userInterpolator;
> this.childClassValidators = childClassValidators;
> initValidator( beanXClass, childClassValidators );
> }
> The other constructor initializes reflectionManager.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list