-
Bug
-
Resolution: Done
-
Major
-
15.0.0.Final
-
None
-
- Unzip ear-tx-web-listener.zip
- deploy the .ear
-
Workaround Exists
-
The deployment of an EAR which contains a WAR with a CDI bean annotated with @Transactional fails with a CNF exception on com.arjuna.ats.jta.cdi.TransactionExtension. An example of the error trace is:
13:44:31,895 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 89) MSC000001: Failed to start service jboss.deployment.subunit."ear-tx-web-listener-ear-1.0.ear"."org.wildfly-ear-tx-web-listener-web-1.0.war".undertow-deployment: org.jboss.msc.service.StartException in service jboss.deployment.subunit."ear-tx-web-listener-ear-1.0.ear"."org.wildfly-ear-tx-web-listener-web-1.0.war".undertow-deployment: java.lang.RuntimeException: javax.servlet.ServletException: UT010013: Could not instantiate org.wildfly.TxWebListener at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:81) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35) at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487) at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378) at java.lang.Thread.run(Thread.java:748) at org.jboss.threads.JBossThread.run(JBossThread.java:485) Caused by: java.lang.RuntimeException: javax.servlet.ServletException: UT010013: Could not instantiate org.wildfly.TxWebListener at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:252) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:96) at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:78) ... 8 more Caused by: javax.servlet.ServletException: UT010013: Could not instantiate org.wildfly.TxWebListener at io.undertow.servlet.core.ManagedListener.start(ManagedListener.java:50) at io.undertow.servlet.core.ApplicationListeners.start(ApplicationListeners.java:159) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:189) at io.undertow.servlet.core.DeploymentManagerImpl$1.call(DeploymentManagerImpl.java:185) at io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:42) at io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43) at org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1502) at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:250) ... 10 more Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:163) at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:134) at org.jboss.as.ee.component.BasicComponent.createInstance(BasicComponent.java:88) at org.jboss.as.ee.component.ComponentRegistry$ComponentManagedReferenceFactory.getReference(ComponentRegistry.java:149) at org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$6.createInstance(UndertowDeploymentInfoService.java:1215) at io.undertow.servlet.core.ManagedListener.start(ManagedListener.java:48) ... 21 more Caused by: org.jboss.weld.exceptions.WeldException: WELD-001524: Unable to load proxy class for bean Extension [class com.arjuna.ats.jta.cdi.TransactionExtension] with qualifiers [@Default]; org.wildfly-ear-tx-web-listener-web-1.0.war with class class com.arjuna.ats.jta.cdi.TransactionExtension using classloader ModuleClassLoader for Module "deployment.ear-tx-web-listener-ear-1.0.ear" from Service Module Loader at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:370) at org.jboss.weld.bean.proxy.ProxyFactory.run(ProxyFactory.java:324) at org.jboss.weld.bean.proxy.ProxyFactory.create(ProxyFactory.java:316) at org.jboss.weld.bean.proxy.ClientProxyFactory.create(ClientProxyFactory.java:83) at org.jboss.weld.bean.proxy.ClientProxyProvider.createClientProxy(ClientProxyProvider.java:205) at org.jboss.weld.bean.proxy.ClientProxyProvider.createClientProxy(ClientProxyProvider.java:195) at org.jboss.weld.bean.proxy.ClientProxyProvider.access$100(ClientProxyProvider.java:44) at org.jboss.weld.bean.proxy.ClientProxyProvider$CreateClientProxy.apply(ClientProxyProvider.java:52) at org.jboss.weld.bean.proxy.ClientProxyProvider$CreateClientProxy.apply(ClientProxyProvider.java:48) at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.lambda$null$0(ReentrantMapBackedComputingCache.java:55) at org.jboss.weld.util.LazyValueHolder$1.computeValue(LazyValueHolder.java:32) at org.jboss.weld.util.LazyValueHolder.get(LazyValueHolder.java:46) at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.getValue(ReentrantMapBackedComputingCache.java:72) at org.jboss.weld.util.cache.ReentrantMapBackedComputingCache.getCastValue(ReentrantMapBackedComputingCache.java:78) at org.jboss.weld.bean.proxy.ClientProxyProvider.getClientProxy(ClientProxyProvider.java:229) at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:694) at org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:800) at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92) at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:336) at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:347) at org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:69) at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48) at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:71) at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:117) at org.jboss.weld.bean.ManagedBean.create(ManagedBean.java:159) at org.jboss.weld.contexts.unbound.DependentContextImpl.get(DependentContextImpl.java:70) at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100) at org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50) at org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:700) at org.jboss.weld.bean.interceptor.CdiInterceptorFactory.create(CdiInterceptorFactory.java:46) at org.jboss.weld.interceptor.proxy.InterceptionContext.initInterceptorInstanceMap(InterceptionContext.java:102) at org.jboss.weld.interceptor.proxy.InterceptionContext.of(InterceptionContext.java:77) at org.jboss.weld.interceptor.proxy.InterceptionContext.forNonConstructorInterception(InterceptionContext.java:73) at org.jboss.weld.injection.producer.InterceptorApplyingInstantiator.newInstance(InterceptorApplyingInstantiator.java:60) at org.jboss.weld.injection.producer.BasicInjectionTarget.produce(BasicInjectionTarget.java:112) at org.jboss.weld.injection.producer.BeanInjectionTarget.produce(BeanInjectionTarget.java:186) at org.jboss.as.weld.injection.WeldInjectionContext.produce(WeldInjectionContext.java:46) at org.jboss.as.weld.injection.WeldManagedReferenceFactory.create(WeldManagedReferenceFactory.java:55) at org.jboss.as.ee.component.ComponentInstantiatorInterceptor.processInvocation(ComponentInstantiatorInterceptor.java:67) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53) at org.jboss.as.ee.component.AroundConstructInterceptorFactory$1.processInvocation(AroundConstructInterceptorFactory.java:26) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.weld.injection.WeldInterceptorInjectionInterceptor.processInvocation(WeldInterceptorInjectionInterceptor.java:56) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.weld.injection.WeldInjectionContextInterceptor.processInvocation(WeldInjectionContextInterceptor.java:43) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.as.ee.concurrent.ConcurrentContextInterceptor.processInvocation(ConcurrentContextInterceptor.java:45) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.ContextClassLoaderInterceptor.processInvocation(ContextClassLoaderInterceptor.java:60) at org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422) at org.jboss.invocation.ChainedInterceptor.processInvocation(ChainedInterceptor.java:53) at org.jboss.as.ee.component.BasicComponent.constructComponentInstance(BasicComponent.java:161) ... 26 more Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/arjuna/ats/jta/cdi/TransactionExtension at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:113) at org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass(ProxyFactory.java:469) at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:362) ... 78 more Caused by: java.lang.NoClassDefFoundError: com/arjuna/ats/jta/cdi/TransactionExtension at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:763) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.jboss.weld.util.bytecode.ClassFileUtils.toClass2(ClassFileUtils.java:120) at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:109) ... 80 more Caused by: java.lang.ClassNotFoundException: com.arjuna.ats.jta.cdi.TransactionExtension from [Module "deployment.ear-tx-web-listener-ear-1.0.ear" from Service Module Loader] at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:255) at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:410) at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:398) at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116) ... 88 more 13:44:31,902 ERROR [org.jboss.as.controller.management-operation] (management-handler-thread - 1) WFLYCTL0013: Operation ("deploy") failed - address: ({"deployment" => "ear-tx-web-listener-ear-1.0.ear"}) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"ear-tx-web-listener-ear-1.0.ear\".\"org.wildfly-ear-tx-web-listener-web-1.0.war\".undertow-deployment" => "java.lang.RuntimeException: javax.servlet.ServletException: UT010013: Could not instantiate org.wildfly.TxWebListener Caused by: java.lang.RuntimeException: javax.servlet.ServletException: UT010013: Could not instantiate org.wildfly.TxWebListener Caused by: javax.servlet.ServletException: UT010013: Could not instantiate org.wildfly.TxWebListener Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance Caused by: org.jboss.weld.exceptions.WeldException: WELD-001524: Unable to load proxy class for bean Extension [class com.arjuna.ats.jta.cdi.TransactionExtension] with qualifiers [@Default]; org.wildfly-ear-tx-web-listener-web-1.0.war with class class com.arjuna.ats.jta.cdi.TransactionExtension using classloader ModuleClassLoader for Module \"deployment.ear-tx-web-listener-ear-1.0.ear\" from Service Module Loader Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/arjuna/ats/jta/cdi/TransactionExtension Caused by: java.lang.NoClassDefFoundError: com/arjuna/ats/jta/cdi/TransactionExtension Caused by: java.lang.ClassNotFoundException: com.arjuna.ats.jta.cdi.TransactionExtension from [Module \"deployment.ear-tx-web-listener-ear-1.0.ear\" from Service Module Loader]"}} 13:44:31,903 ERROR [org.jboss.as.server] (management-handler-thread - 1) WFLYSRV0021: Deploy of deployment "ear-tx-web-listener-ear-1.0.ear" was rolled back with the following failure message: {"WFLYCTL0080: Failed services" => {"jboss.deployment.subunit.\"ear-tx-web-listener-ear-1.0.ear\".\"org.wildfly-ear-tx-web-listener-web-1.0.war\".undertow-deployment" => "java.lang.RuntimeException: javax.servlet.ServletException: UT010013: Could not instantiate org.wildfly.TxWebListener Caused by: java.lang.RuntimeException: javax.servlet.ServletException: UT010013: Could not instantiate org.wildfly.TxWebListener Caused by: javax.servlet.ServletException: UT010013: Could not instantiate org.wildfly.TxWebListener Caused by: java.lang.IllegalStateException: WFLYEE0042: Failed to construct component instance Caused by: org.jboss.weld.exceptions.WeldException: WELD-001524: Unable to load proxy class for bean Extension [class com.arjuna.ats.jta.cdi.TransactionExtension] with qualifiers [@Default]; org.wildfly-ear-tx-web-listener-web-1.0.war with class class com.arjuna.ats.jta.cdi.TransactionExtension using classloader ModuleClassLoader for Module \"deployment.ear-tx-web-listener-ear-1.0.ear\" from Service Module Loader Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: com/arjuna/ats/jta/cdi/TransactionExtension Caused by: java.lang.NoClassDefFoundError: com/arjuna/ats/jta/cdi/TransactionExtension Caused by: java.lang.ClassNotFoundException: com.arjuna.ats.jta.cdi.TransactionExtension from [Module \"deployment.ear-tx-web-listener-ear-1.0.ear\" from Service Module Loader]"}}
In WF15 some modules were cleaned up removing the apparently uneeded weld dependencies. Specifically, this issue is a consequence of WFLY-11165, where the "org.jboss.weld.core" module was removed from "org.jboss.jts" module.
Since org.jboss.jts does not have dependencies on Weld, the proxies loading is delegated to the EAR classloader. The @Transactional annotation is in the WAR subdeployment, so TransactionDependenciesProcessor adds the org.jboss.jts module only to the WAR, failing the load of the TransactionExtension when the EAR class loader is used.