[hibernate-dev] WildFly error running org.jboss.as.test.integration.jpa.hibernate.classfiletransformertest.ClassFileTransformerTestCase (sets hibernate.ejb.use_class_enhancer to true)

Scott Marlow smarlow at redhat.com
Wed Jul 8 19:00:18 EDT 2015


I noticed that CI test failure is only occurring on Windows.  I wonder 
if 
https://github.com/hibernate/hibernate-orm/blob/master/hibernate-core/src/main/java/org/hibernate/bytecode/enhance/spi/Enhancer.java#L114 
is misbehaving on Windows.

On 07/08/2015 04:00 PM, Scott Marlow wrote:
> We are getting a "Failed to define class
> org.jboss.as.test.integration.jpa.hibernate.SFSBHibernateSessionFactory"
> error when running the WildFly tests on the CI machine.  I don't see
> this error locally which is why we didn't see this before.
>
> [1] shows the WildFly console at the time of error.
>
> The class that cannot be defined is
> https://github.com/wildfly/wildfly/blob/master/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/hibernate/SFSBHibernateSessionFactory.java
> [2]
>
> I suspect that this is some type of race condition that we are hitting
> with deployment of three persistence units [3] concurrently from three
> threads.  The persistence units have "hibernate.ejb.use_class_enhancer"
> set to true.  This might have something to do with the same appliation
> class being enhanced concurrently from three threads.
>
> The test case [4] is verifying that enhanced application classes can be
> used.
>
> I'm not exactly sure why the SFSBHibernateSessionFactory class is being
> enhanced.  I thought we only enhanced the entity classes
> (SFSBHibernateSessionFactory references the Employee entity class but is
> not an entity class).
>
> Scott
>
> [1] https://gist.github.com/scottmarlow/c56cfe07f2ea514354aa
>
> [2]
> https://github.com/wildfly/wildfly/blob/master/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/hibernate/SFSBHibernateSessionFactory.java
>
> [3]
> https://github.com/wildfly/wildfly/blob/master/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/hibernate/classfiletransformertest/persistence.xml
>
> [4]
> https://github.com/wildfly/wildfly/blob/master/testsuite/integration/basic/src/test/java/org/jboss/as/test/integration/jpa/hibernate/classfiletransformertest/ClassFileTransformerTestCase.java
> _______________________________________________
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/hibernate-dev
>


More information about the hibernate-dev mailing list