]
Hardy Ferentschik updated HV-263:
---------------------------------
Fix Version/s: 4.1.0
NullPointerException when no constraint in xml
----------------------------------------------
Key: HV-263
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HV-263
Project: Hibernate Validator
Issue Type: Bug
Components: mapping
Affects Versions: 4.0.1
Environment: Linux
Reporter: Michenaud Laurent
Fix For: 4.1.0
In xml configuration, if you declare a bean with no constraint, a
nullpointer exception occurs at validation.
Configuration :
<constraint-mappings
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/mapping
validation-mapping-1.0.xsd"
xmlns="http://jboss.org/xml/ns/javax/validation/mapping">
<default-package>org.mypackage</default-package>
<bean class="Intervention" ignore-annotations="true">
</bean>
</constraint-mappings>
Error at validation :
Exception in thread "main" java.lang.NullPointerException
at
org.hibernate.validator.metadata.BeanMetaDataImpl.initClassConstraints(BeanMetaDataImpl.java:417)
at
org.hibernate.validator.metadata.BeanMetaDataImpl.initClass(BeanMetaDataImpl.java:243)
at
org.hibernate.validator.metadata.BeanMetaDataImpl.createMetaData(BeanMetaDataImpl.java:238)
at
org.hibernate.validator.metadata.BeanMetaDataImpl.<init>(BeanMetaDataImpl.java:117)
at
org.hibernate.validator.metadata.BeanMetaDataImpl.<init>(BeanMetaDataImpl.java:110)
at org.hibernate.validator.engine.ValidatorImpl.getBeanMetaData(ValidatorImpl.java:735)
at
org.hibernate.validator.engine.ValidatorImpl.validateInContext(ValidatorImpl.java:202)
at org.hibernate.validator.engine.ValidatorImpl.validate(ValidatorImpl.java:119)
at com.adeuza.movalys.validation.hibernate.TestMain.main(TestMain.java:71)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: