2 Replies Latest reply on Apr 1, 2016 4:00 AM by Martin Kouba

    Wildfly 10 - Unable to access CDI (EAR Project)

    Estevao Jordao Newbie

      Hi, I would like to help this exception I am getting to go up the Wildfly 10, I'm starting to study the Wildfly 10 and for this I made a simple EAR project, Could you give me a little help it

       

       

      23:26:59,142 INFO  [org.jboss.weld.deployer] (MSC service thread 1-2) WFLYWELD0009: Starting weld service for deployment qvp-ear-0.0.1-SNAPSHOT.ear

      23:26:59,549 INFO  [javax.enterprise.resource.webcontainer.jsf.config] (ServerService Thread Pool -- 63) Monitoring file:/Users/estevaojordao/wildfly-10.0.0.Final/standalone/deployments/qvp-web.war/WEB-INF/faces-config.xml for modifications

      23:26:59,563 INFO  [org.jboss.weld.environment.servletWeldServlet] (ServerService Thread Pool -- 65) WELD-ENV-001008: Initialize Weld using ServletContainerInitializer

      23:26:59,579 WARN  [org.jboss.weld.environment.servletWeldServlet] (ServerService Thread Pool -- 65) WELD-ENV-001004: Found both WEB-INF/beans.xml and WEB-INF/classes/META-INF/beans.xml. It's not portable to use both locations at the same time. Weld is going to use file:/Users/estevaojordao/wildfly-10.0.0.Final/standalone/deployments/qvp-ear-0.0.1-SNAPSHOT.ear/qvp-war-0.0.1-SNAPSHOT.war/WEB-INF/beans.xml.

      23:26:59,597 INFO  [org.jboss.weld.Bootstrap] (ServerService Thread Pool -- 65) WELD-000101: Transactional services not available. Injection of @Inject UserTransaction not available. Transactional observers will be invoked synchronously.

      23:26:59,613 INFO  [org.wildfly.extension.undertow] (ServerService Thread Pool -- 63) WFLYUT0021: Registered web context: /qvp-web

      23:26:59,625 INFO  [org.jboss.weld.environment.servletWeldServlet] (ServerService Thread Pool -- 65) WELD-ENV-001001: No supported servlet container detected, CDI injection will NOT be available in Servlets, Filters or Listeners

      23:26:59,696 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 65) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./qvp-war: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./qvp-war: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to access CDI

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:85)

        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

        at java.util.concurrent.FutureTask.run(FutureTask.java:266)

        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)

        at org.jboss.threads.JBossThread.run(JBossThread.java:320)

      Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to access CDI

        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:231)

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:100)

        at org.wildfly.extension.undertow.deployment.UndertowDeploymentService$1.run(UndertowDeploymentService.java:82)

        ... 6 more

      Caused by: java.lang.IllegalStateException: Unable to access CDI

        at javax.enterprise.inject.spi.CDI.current(CDI.java:65)

        at org.jboss.weld.servlet.WeldInitialListener.contextInitialized(WeldInitialListener.java:94)

        at org.jboss.weld.servlet.api.helpers.ForwardingServletListener.contextInitialized(ForwardingServletListener.java:34)

        at org.jboss.weld.environment.servlet.EnhancedListener.onStartup(EnhancedListener.java:63)

        at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:184)

        ... 8 more

       

      23:26:59,702 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "qvp-ear-0.0.1-SNAPSHOT.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {"jboss.undertow.deployment.default-server.default-host./qvp-war" => "org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./qvp-war: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to access CDI

          Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to access CDI

          Caused by: java.lang.IllegalStateException: Unable to access CDI"}}

      23:26:59,721 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "qvp-web.war" (runtime-name : "qvp-web.war")

      23:26:59,721 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "qvp-ear-0.0.1-SNAPSHOT.ear" (runtime-name : "qvp-ear-0.0.1-SNAPSHOT.ear")

      23:26:59,721 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "qvp-common.jar" (runtime-name : "qvp-common.jar")

      23:26:59,721 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "qvp-business.jar" (runtime-name : "qvp-business.jar")

      23:26:59,722 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report

      WFLYCTL0186:   Services which failed to start:      service jboss.undertow.deployment.default-server.default-host./qvp-war: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./qvp-war: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to access CDI

       

      23:26:59,788 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management

      23:26:59,788 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990

       

       

      Thank you, if need more information, please let me know