On Wed, Jul 08, 2015 at 09:11:55AM -0400, Scott Marlow wrote: > >Just fishing here, but "integration code and the ORM 5 persistence provider" > >might > >indicate a problem in the persistence bootstrapping. > >Have a look at > >org.hibernate.cfg.beanvalidation.TypeSafeActivator#getValidatorFactory. > >Basically ORM expects to retrieve the ValidatorFactory to use for the life > >cycle based > >validation from the properties passed via the Persistence bootstrap. The > >property name > >is javax.persistence.validation.factory. If there is no instance passed ORM > >will bootstrap > >a default factory using Validation.buildDefaultValidatorFactory(). The > >latter would > >of course not be CDI enabled. This would explain why validation occurs, but > >not CDI injection. > >I would for sure put a breakpoint in there as well (and some trace/debug log > >would be probably > >nice to have as well to easily tell whether a factory is passed or a default > >one is generated. > > Good suggestion, the validation factory does get passed in during the second > bootstrap phase. If we looked for it during the first JPA bootstrap phase, > we would not see it in Hibernate ORM 5. We should check that
+1 I am also confused about your debugging instructions. You are suggesting to use the Wildfly instance under dist/target. When I do that and have this instance running when while executing 'mvn install -Dtest=*BeanValidationCdiIntegrationTestCase*' the tests actually pass. Apparently in this case Arquillian is configured to run against the running Wildfly instance. If I, however, run the tests without having a running Wildfly instance the tests keep failing. Seems to me that a different Wildfly instance is used. I guess I don't fully understand the test setup in the widlfly repo and this integration tests in particular, but obviously I want to debug the right thing. --Hardy
pgpQrysDMdp6y.pgp
Description: PGP signature
_______________________________________________ hibernate-dev mailing list hibernate-dev@lists.jboss.org https://lists.jboss.org/mailman/listinfo/hibernate-dev