Gunnar,

In a standard bootstrap, the map parameter in the call to 
createContainerEntityManagerFactory(PersistenceUnitInfo info, Map map), 
should have the ValidatorFactory.

For the path that your debugging (2 phase bootstrap), 
org.hibernate.jpa.boot.spi.EntityManagerFactoryBuilder.withValidatorFactory(Object)
 
should of been called.  If the Hibernate ORM version is 4.3 or 5.0, we 
should be calling EntityManagerFactoryBuilder.withValidatorFactory, 
could you check if that was called or not?

Scott

On 09/23/2015 07:38 AM, Gunnar Morling wrote:
> 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
>
_______________________________________________
hibernate-dev mailing list
hibernate-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/hibernate-dev

Reply via email to