[
https://issues.jboss.org/browse/WFLY-11891?page=com.atlassian.jira.plugin...
]
Scott Marlow commented on WFLY-11891:
-------------------------------------
I captured a bit more of the relevant call stack + exception for the failure during EJB
view class generation:
Below call stack shows EJB container about to generate view class via ClassFileWriter.
{quote}
10:43:45,828 ERROR [stderr] (MSC service thread 1-3) java.lang.Exception: Stack trace
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
java.lang.Thread.dumpStack(Thread.java:1336)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.classfilewriter.ClassFile.defineInternal(ClassFile.java:298)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.classfilewriter.ClassFile.define(ClassFile.java:286)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.invocation.proxy.AbstractClassFactory.defineClass(AbstractClassFactory.java:202)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.invocation.proxy.AbstractProxyFactory.getCachedMethods(AbstractProxyFactory.java:162)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.ee.component.ViewConfiguration.addViewInterceptor(ViewConfiguration.java:119)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.ee.component.NamespaceViewConfigurator.configure(NamespaceViewConfigurator.java:34)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.ee.component.DefaultComponentViewConfigurator.configure(DefaultComponentViewConfigurator.java:91)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
10:43:45,831 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
10:43:45,831 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
10:43:45,831 ERROR [stderr] (MSC service thread 1-3) at
java.lang.Thread.run(Thread.java:748)
{quote}
But, ByteBuddy fails defining the class.
{quote}
then exception is thrown:
10:43:45,828 ERROR [stderr] (MSC service thread 1-3) java.lang.Exception: Stack trace
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
java.lang.Thread.dumpStack(Thread.java:1336)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.classfilewriter.ClassFile.defineInternal(ClassFile.java:298)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.classfilewriter.ClassFile.define(ClassFile.java:286)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.invocation.proxy.AbstractClassFactory.defineClass(AbstractClassFactory.java:202)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.invocation.proxy.AbstractProxyFactory.getCachedMethods(AbstractProxyFactory.java:162)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.ee.component.ViewConfiguration.addViewInterceptor(ViewConfiguration.java:119)
10:43:45,829 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.ee.component.NamespaceViewConfigurator.configure(NamespaceViewConfigurator.java:34)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.ee.component.DefaultComponentViewConfigurator.configure(DefaultComponentViewConfigurator.java:91)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
10:43:45,830 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
10:43:45,831 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
10:43:45,831 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
10:43:45,831 ERROR [stderr] (MSC service thread 1-3) at
java.lang.Thread.run(Thread.java:748)
10:45:23,663 ERROR [stderr] (MSC service thread 1-3) java.lang.ClassFormatError:
WFLYJPA0073: Transformation of class
org/jboss/as/test/integration/jpa/transaction/SFSBXPC$$$view3 failed
10:45:23,663 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.modules.ModuleClassLoader.defineClassInternal(ModuleClassLoader.java:460)
10:45:23,663 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.modules.ModuleClassLoader.defineClassInternal(ModuleClassLoader.java:480)
10:45:23,663 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.modules.ClassDefiner.defineClass(ClassDefiner.java:144)
10:45:23,663 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.server.deployment.ModuleClassFactory.defineClass(ModuleClassFactory.java:56)
10:45:23,663 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.classfilewriter.ClassFile.defineInternal(ClassFile.java:299)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.classfilewriter.ClassFile.define(ClassFile.java:286)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.invocation.proxy.AbstractClassFactory.defineClass(AbstractClassFactory.java:202)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.invocation.proxy.AbstractProxyFactory.getCachedMethods(AbstractProxyFactory.java:162)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.ee.component.ViewConfiguration.addViewInterceptor(ViewConfiguration.java:119)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.ee.component.NamespaceViewConfigurator.configure(NamespaceViewConfigurator.java:34)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.ee.component.DefaultComponentViewConfigurator.configure(DefaultComponentViewConfigurator.java:91)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.ee.component.deployers.EEModuleConfigurationProcessor.deploy(EEModuleConfigurationProcessor.java:92)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:176)
10:45:23,664 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1738)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1700)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1558)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1377)
10:45:23,665 ERROR [stderr] (MSC service thread 1-3) at
java.lang.Thread.run(Thread.java:748)
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) Caused by:
java.lang.IllegalStateException: WFLYJPA0073: Transformation of class
org/jboss/as/test/integration/jpa/transaction/SFSBXPC$$$view3 failed
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.jpa.classloader.JPADelegatingClassFileTransformer.transform(JPADelegatingClassFileTransformer.java:68)
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.jpa.classloader.JPADelegatingClassFileTransformer.transform(JPADelegatingClassFileTransformer.java:49)
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.server.deployment.module.DelegatingClassFileTransformer.transform(DelegatingClassFileTransformer.java:60)
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.modules.JLIClassTransformer.transform(JLIClassTransformer.java:55)
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.modules.ModuleClassLoader.defineClassInternal(ModuleClassLoader.java:458)
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) ... 20 more
10:45:23,666 ERROR [stderr] (MSC service thread 1-3) Caused by:
org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImpl$1: Error performing
enhancement of org/jboss/as/test/integration/jpa/transaction/SFSBXPC$$$view3
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) at
org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImpl.transform(EnhancingClassTransformerImpl.java:47)
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) at
org.jboss.as.jpa.classloader.JPADelegatingClassFileTransformer.transform(JPADelegatingClassFileTransformer.java:66)
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) ... 24 more
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) Caused by:
org.hibernate.bytecode.enhance.spi.EnhancementException: Failed to enhance class
org/jboss/as/test/integration/jpa/transaction/SFSBXPC$$$view3
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) at
org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.enhance(EnhancerImpl.java:142)
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) at
org.hibernate.jpa.internal.enhance.EnhancingClassTransformerImpl.transform(EnhancingClassTransformerImpl.java:44)
10:45:23,667 ERROR [stderr] (MSC service thread 1-3) ... 25 more
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) Caused by:
java.lang.IllegalStateException: Cannot resolve type description for
org.jboss.as.test.integration.jpa.transaction.SFSBXPC$$$view3
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at
net.bytebuddy.pool.TypePool$Resolution$Illegal.resolve(TypePool.java:159)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at
net.bytebuddy.pool.TypePool$Default$WithLazyResolution$LazyTypeDescription.delegate(TypePool.java:1407)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at
net.bytebuddy.description.type.TypeDescription$AbstractBase$OfSimpleType$WithDelegation.getModifiers(TypeDescription.java:8115)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at
net.bytebuddy.dynamic.scaffold.InstrumentedType$Factory$Default$1.represent(InstrumentedType.java:359)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at
net.bytebuddy.ByteBuddy.redefine(ByteBuddy.java:731)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at
org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.lambda$enhance$0(EnhancerImpl.java:137)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at
org.hibernate.bytecode.internal.bytebuddy.ByteBuddyState.rewrite(ByteBuddyState.java:149)
10:45:23,668 ERROR [stderr] (MSC service thread 1-3) at
org.hibernate.bytecode.enhance.internal.bytebuddy.EnhancerImpl.enhance(EnhancerImpl.java:136)
10:45:23,669 ERROR [stderr] (MSC service thread 1-3) ... 26 more
{quote}
Add tests that enable JPA entity class bytecode enhancement
-----------------------------------------------------------
Key: WFLY-11891
URL:
https://issues.jboss.org/browse/WFLY-11891
Project: WildFly
Issue Type: Enhancement
Components: JPA / Hibernate
Affects Versions: 16.0.0.Final
Reporter: Scott Marlow
Assignee: Scott Marlow
Priority: Minor
Attachments: bytebuddy.log, javassist.log
Pick a few unit tests and add the following settings to enable [entity bytecode
enhancement|http://docs.jboss.org/hibernate/orm/5.3/userguide/html_single...]:
{code}
<property name="hibernate.enhancer.enableDirtyTracking"
value="true"/>
<property name="hibernate.enhancer.enableLazyInitialization"
value="true"/>
<property name="hibernate.enhancer.enableAssociationManagement"
value="true"/>
{code}
Steps to reproduce:
* Build WildFly
* cd testsuite/integration/basic
* mvn clean install
-Dtest=org.jboss.as.test.integration.jpa.transaction.TransactionTestCase
* mvn clean install
-Dtest=org.jboss.as.test.integration.jpa.hibernate.management.ManagementTestCase
* mvn clean install
-Dtest=org.jboss.as.test.integration.jpa.entitylistener.EntityListenersTestCase
* mvn clean install
-Dtest=org.jboss.as.test.integration.jpa.secondlevelcache.JPA2LCTestCase
Note that the org.jboss.as.test.integration.jpa.transaction.TransactionTestCase test
should pass since javassist is specified in the persistence.xml but that seems to be
ignored (we still get the ByteBuddy failure).
To workaround failures, prestart wildfly via: ./standalone.sh
-Dhibernate.bytecode.provider=javassist and then run tests.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)