[hibernate-dev] WildFly tests with ByteBuddy enhancement are failing

Gail Badner gbadner at redhat.com
Fri Mar 22 02:54:32 EDT 2019


Scott added bytecode enhancement to some WildFly tests for WFLY-11891 [1],
which are failing.

Here is Scott's PR with the updated tests: [2]

When I stepped into
org.jboss.as.test.integration.jpa.basic.multiplepersistenceunittest.MultiplePuTestCase,
I can see that they are failing in ByteBuddy code.

I see that:

   -  enhancement of
   org.jboss.as.test.integration.jpa.basic.SLSBPersistenceContexts gets
   skipped several times in a row;
   - enhancement of some other classes get skipped;
   - before trying to enhance
   org.jboss.as.test.integration.jpa.basic.SLSBPersistenceContexts$$$view5, an
   exception is thrown.

Unfortunately, I'm having trouble getting a good stacktrace to show what
happens in ByteBuddy code.

Here is what I'm seeing:

net.bytebuddy.pool.TypePool$Default.doDescribe("org.jboss.as.test.integration.jpa.basic.SLSBPersistenceContexts$$$view5")
/* class name differs from run to run */


calls net.bytebuddy.dynamic.ClassFileLocator$ForClassLoader.locate( "
org.jboss.as.test.integration.jpa.basic.SLSBPersistenceContexts$$$view5")

calls net.bytebuddy.dynamic.ClassFileLocator.ForClassLoader.locate(
classLoader, "org.jboss.as.test.integration.jpa.basic.SLSBPersistenceContexts$$$view5"
)

calls
classLoader.getResourceAsStream("org/jboss/as/test/integration/jpa/basic/SLSBPersistenceContexts$$$view5.class"),
which returns null;

(I don't actually see a class file with this name)


returns new TypePool.Resolution.Illegal(

"org/jboss/as/test/integration/jpa/basic/SLSBPersistenceContexts$$$view5.class"

)

returns TypePool.Resolution.Illegal


Ultimately, TypePool.Resolution.Illegal#resolve( ) throws
IllegalStateException, because the type description cannot be resolved.

I'm not sure if the problem is in WildFly, Hibernate, or ByteBuddy.

To build WildFly:
./build.sh clean install -DskipTests=true

To run the test:
cd testsuite/integration/basic
mvn install
-Dtest=org/jboss/as/test/integration/jpa/basic/multiplepersistenceunittest/MultiplePuTestCase

Help would be very much appreciated.

Thanks,
Gail

[1] https://issues.jboss.org/browse/WFLY-11891
[2] https://github.com/wildfly/wildfly/pull/12180


More information about the hibernate-dev mailing list