Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-6890

Add Weld SPI dependency to the transactions module

    XMLWordPrintable

Details

    Description

      To fix JBTM-2704 we need to access bean manager classes from Weld core. To get that dependency on Weld SPI is needed.
      Without Weld SPI dependency, handlers in JAR as part of EAR cannot be found:

      ^[[0m^[[31m11:28:32,054 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-4) MSC000001: Failed to start service jboss.deployment.unit."service.ear".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."service.ear".WeldStartService: Failed to start service
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
              at java.lang.Thread.run(Thread.java:745)
      Caused by: org.jboss.weld.exceptions.WeldException: WELD-001524: Unable to load proxy class for bean @New Managed Bean [class org.jboss.narayana.compensations.internal.CompensatableActionImpl] with qualifiers [@New] with class class org.jboss.narayana.compensations.internal.CompensatableActionImpl using classloader ModuleClassLoader for Module "deployment.service.ear:main" from Service Module Loader
              at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:371)
              at org.jboss.weld.injection.producer.SubclassedComponentInstantiator.createEnhancedSubclass(SubclassedComponentInstantiator.java:114)
              at org.jboss.weld.injection.producer.SubclassedComponentInstantiator.initEnhancedSubclass(SubclassedComponentInstantiator.java:86)
              at org.jboss.weld.injection.producer.SubclassedComponentInstantiator.<init>(SubclassedComponentInstantiator.java:79)
              at org.jboss.weld.injection.producer.SubclassedComponentInstantiator.forInterceptedDecoratedBean(SubclassedComponentInstantiator.java:63)
              at org.jboss.weld.injection.producer.BeanInjectionTarget.initializeAfterBeanDiscovery(BeanInjectionTarget.java:121)
              at org.jboss.weld.injection.producer.InjectionTargetInitializationContext.initialize(InjectionTargetInitializationContext.java:42)
              at org.jboss.weld.injection.producer.InjectionTargetService.initialize(InjectionTargetService.java:63)
              at org.jboss.weld.bootstrap.WeldStartup.deployBeans(WeldStartup.java:433)
              at org.jboss.weld.bootstrap.WeldBootstrap.deployBeans(WeldBootstrap.java:83)
              at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:95)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881)
              ... 3 more
      Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/jboss/narayana/compensations/api/CompensatableAction
              at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:101)
              at org.jboss.weld.bean.proxy.ProxyFactory.createProxyClass(ProxyFactory.java:491)
              at org.jboss.weld.bean.proxy.ProxyFactory.getProxyClass(ProxyFactory.java:364)
              ... 15 more
      Caused by: java.lang.NoClassDefFoundError: org/jboss/narayana/compensations/api/CompensatableAction
              at java.lang.ClassLoader.defineClass1(Native Method)
              at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
              at sun.reflect.GeneratedMethodAccessor34.invoke(Unknown Source)
              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:108)
              at org.jboss.weld.util.bytecode.ClassFileUtils.toClass(ClassFileUtils.java:97)
              ... 17 more
      Caused by: java.lang.ClassNotFoundException: org.jboss.narayana.compensations.api.CompensatableAction from [Module "deployment.service.ear:main" from Service Module Loader]
              at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:199)
              at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:364)
              at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:352)
              at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:94)
              ... 24 more
      

      Attachments

        Issue Links

          Activity

            People

              gtrikler@redhat.com Gytis Trikleris (Inactive)
              gtrikler@redhat.com Gytis Trikleris (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: