[hibernate-issues] [Hibernate-JIRA] Created: (HV-159) NullPointerException in ValidatorFactoryImpl, if XML config file doesn't contain at least one constraint and one cascade configuration

Gunnar Morling (JIRA) noreply at atlassian.com
Tue May 5 08:31:17 EDT 2009


NullPointerException in ValidatorFactoryImpl, if XML config file doesn't contain at least one constraint and one cascade configuration
--------------------------------------------------------------------------------------------------------------------------------------

                 Key: HV-159
                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-159
             Project: Hibernate Validator
          Issue Type: Bug
    Affects Versions: 4.0.0.Beta1
            Reporter: Gunnar Morling
         Attachments: hv-bugscenario.zip

When using the XML based approach for constraint configuration, I get 

- a NullPointerException in ValidatorFactoryImpl, line 98, if I don't have at least one constraint configuration declared such as

<field name="orderDate">
	<constraint annotation="javax.validation.constraints.Past">
		<message>Some overridden message.</message>
	</constraint>
</field>

- a NullPointerException in ValidatorFactoryImpl, line 100, if I don't have at least one cascade configuration declared such as

<field name="orderLines">
	<valid/>
 </field>

The attached project demonstrates the problem. By uncommenting the two field elements in src/main/resources/META-INF/validation/order-constraints.xml the test will run successfully.


-- 
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