[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 16:00:58 EDT 2015
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
More information about the hibernate-dev
mailing list