GUJ Discussões   :   últimos tópicos   |   categorias   |   GUJ Respostas

[resolvido]-Aplicação wildyFly 8.0 não sobre

java
Tags: #<Tag:0x00007f25ffd4e1b8>

#21

Sim e não adiantou


#22

O erro mudou

10:02:01,173 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.undertow.deployment.default-server.default-host./desif: org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./desif: Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1904) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [rt.jar:1.8.0_121]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [rt.jar:1.8.0_121]
at java.lang.Thread.run(Unknown Source) [rt.jar:1.8.0_121]
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to access CDI
at io.undertow.servlet.core.DeploymentManagerImpl.deploy(DeploymentManagerImpl.java:216)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.startContext(UndertowDeploymentService.java:86)
at org.wildfly.extension.undertow.deployment.UndertowDeploymentService.start(UndertowDeploymentService.java:71)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1948) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1881) [jboss-msc-1.2.0.Final.jar:1.2.0.Final]
… 3 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:85)
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:176)
… 7 more

10:02:01,183 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) JBAS014613: Operation (“deploy”) failed - address: ([(“deployment” => “desif.war”)]) - failure description: {“JBAS014671: Failed services” => {“jboss.undertow.deployment.default-server.default-host./desif” => “org.jboss.msc.service.StartException in service jboss.undertow.deployment.default-server.default-host./desif: Failed to start service
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: Unable to access CDI
Caused by: java.lang.IllegalStateException: Unable to access CDI”}}


#23

Segundo este tópico, o erro é proveniente da inclusão de artefatos referentes ao CDI.
Como o CDI se utilizará de recursos disponibilizados pelo Wildfly, você deve remover estas dependências ou incluir a tag

<scope>provided</scope>

A cada um dos artefatos referentes ao CDI.
Ah, talvez ocorram erros semelhantes com relação a outros artefatos, daí já tem um norte para resolver.


#24

Depois de um bom tempo, achei este tópico

Criei conforme o autor disse e fui implemetando depedencia por depdencia.

Menos esta que entendi que é para tomcat

JBoss/Weld implementação de referência do CDI para Servlet Container(Exemplo:Tomcat)
dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet</artifactId>
<version>2.2.6.Final</version>
<scope>runtime</scope>
</dependency>

Obrigado a todos