[hibernate-dev] No ValidatorFactory exposed through "javax.persistence.validation.factory" in WF 10 CR1

Gunnar Morling gunnar at hibernate.org
Wed Sep 23 07:38:00 EDT 2015


Scott,

Upgrading the Hibernate Validator integration tests to run on WF 10
CR1, two tests fail for me DefaultValidatorFactoryInPersistenceUnitIT
and CustomValidatorFactoryInPersistenceUnitIT.

These are about accessing the validator factory from the entity
manager factory through the "javax.persistence.validation.factory"
property. The look-up returns null, though. I tried to debug that a
bit but I am a bit lost in WF's PersistenceUnitServiceImpl. The code
in start() populates the property in a map, but that map is not used
for the EMF actually bootstrapped (which happens through the
EntityManagerFactoryBuilder
phaseOnePersistenceUnitService.getEntityManagerFactoryBuilder(), which
does not get this property set).

Could you check this one out? Maybe JipiJapa's
EntityManagerFactoryBuilder should set that property to VF given via
withValidatorFactory()?

Thanks,

--Gunnar

[1] https://github.com/hibernate/hibernate-validator/blob/master/integration/src/test/java/org/hibernate/validator/integration/wildfly/DefaultValidatorFactoryInPersistenceUnitIT.java
[2] https://github.com/hibernate/hibernate-validator/blob/master/integration/src/test/java/org/hibernate/validator/integration/wildfly/CustomValidatorFactoryInPersistenceUnitIT.java


More information about the hibernate-dev mailing list