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

Application deployment fails with java.lang.NoClassDefFoundError: javax/enterprise/inject/Any$Literal

XMLWordPrintable

      Application fails to deploy with the below stack trace. EE8 preview mode is NOT enabled, which appears to be the cause. cdi-api-2.0.jar contains the class, but cdi-api-1.2.jar does not.

      10:27:34,790 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-3) MSC000001: Failed to start service jboss.deployment.unit."song-gaming-portal.war".WeldStartService: org.jboss.msc.service.StartException in service jboss.deployment.unit."song-gaming-portal.war".WeldStartService: Failed to start service
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1706)
      at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1540)
      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) [rt.jar:1.8.0_162]
      Caused by: java.lang.NoClassDefFoundError: javax/enterprise/inject/Any$Literal
      at org.jboss.weld.util.Observers.isContainerLifecycleObserverMethod(Observers.java:102) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
      at org.jboss.weld.bootstrap.ExtensionBeanDeployer.createObserverMethod(ExtensionBeanDeployer.java:151) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
      at org.jboss.weld.bootstrap.ExtensionBeanDeployer.createObserverMethods(ExtensionBeanDeployer.java:140) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
      at org.jboss.weld.bootstrap.ExtensionBeanDeployer.deployBean(ExtensionBeanDeployer.java:101) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
      at org.jboss.weld.bootstrap.ExtensionBeanDeployer.deployBeans(ExtensionBeanDeployer.java:75) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
      at org.jboss.weld.bootstrap.WeldStartup.startInitialization(WeldStartup.java:377) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
      at org.jboss.weld.bootstrap.WeldBootstrap.startInitialization(WeldBootstrap.java:76) [weld-core-impl-3.0.3.Final.jar:3.0.3.Final]
      at org.jboss.as.weld.WeldStartService.start(WeldStartService.java:95)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1714)
      at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1693)
      ... 6 more
      Caused by: java.lang.ClassNotFoundException: javax.enterprise.inject.Any$Literal from [Module "org.jboss.weld.core" from local module loader @2ea6137 (finder: local module finder @41ee392b (roots: D:\wildfly\wildfly-12.0.0.Final-GP\modules,D:\wildfly\wildfly-12.0.0.Final-GP\modules\system\layers\base))]
      at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:199) [jboss-modules.jar:1.7.0.Final]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:412) [jboss-modules.jar:1.7.0.Final]
      at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:400) [jboss-modules.jar:1.7.0.Final]
      at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:116) [jboss-modules.jar:1.7.0.Final]
      ... 16 more

              mkouba@redhat.com Martin Kouba
              rdicroce Richard DiCroce (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: