Ainda não tem acesso? Estude com a gente! Matricule-se
Ainda não tem acesso? Estude com a gente! Matricule-se

Solucionado (ver solução)

Problema ao subir o servidor

Boa noite, Alguém poderia me ajudar por favor? Depois de configurar o datasource realizando todos os passos da aula ao tentar subir o servidor ele apresentou o seguinte problema:

23:37:26,111 INFO  [org.apache.activemq.artemis.ra] (MSC service thread 1-1) Resource adaptor started
23:37:26,112 INFO  [org.jboss.as.connector.services.resourceadapters.ResourceAdapterActivatorService$ResourceAdapterActivator] (MSC service thread 1-1) IJ020002: Deployed: file://RaActivatoractivemq-ra
23:37:26,113 INFO  [org.wildfly.extension.messaging-activemq] (MSC service thread 1-8) WFLYMSGAMQ0002: Bound messaging object to jndi name java:jboss/DefaultJMSConnectionFactory
23:37:26,113 INFO  [org.jboss.as.connector.deployment] (MSC service thread 1-6) WFLYJCA0002: Bound JCA ConnectionFactory [java:/JmsXA]
23:37:26,851 INFO  [org.jboss.as.jpa] (MSC service thread 1-7) WFLYJPA0002: Read persistence.xml for allweb-dev
23:37:28,582 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "allweb.war")]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"allweb.war#allweb-dev\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.allwebDS]"]}
23:37:28,753 INFO  [org.jboss.as.server] (ServerService Thread Pool -- 37) WFLYSRV0010: Deployed "allweb.war" (runtime-name : "allweb.war")
23:37:28,755 INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0184:    New missing/unsatisfied dependencies:
      service jboss.naming.context.java.jboss.datasources.allwebDS (missing) dependents: [service jboss.persistenceunit."allweb.war#allweb-dev".__FIRST_PHASE__] 

23:37:28,991 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management
23:37:28,991 INFO  [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990
23:37:28,992 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final) started (with errors) in 42703ms - Started 319 of 606 services (2 services failed or missing dependencies, 388 services are lazy, passive or on-demand)
23:37:29,091 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-4) WFLYSRV0028: Stopped deployment allweb.war (runtime-name: allweb.war) in 22ms
23:37:29,232 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 1) WFLYSRV0009: Undeployed "allweb.war" (runtime-name: "allweb.war")
23:37:29,233 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 1) WFLYCTL0183: Service status report
WFLYCTL0184:    New missing/unsatisfied dependencies:
      service jboss.persistenceunit."allweb.war#allweb-dev".__FIRST_PHASE__ (missing) dependents: [service jboss.deployment.unit."allweb.war".POST_MODULE] 

23:37:33,830 INFO  [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) WFLYDS0004: Found allweb.war in deployment directory. To trigger deployment create a file called allweb.war.dodeploy
5 respostas

Opa, realmente está falando que não existe allwebDS configurado. Tem o standalone.xml aí? Em geral, minha primeira resposta é baseado diretamente no que a exception fala.

Segue o link do Gist com conteúdo do standalone-full.xml

https://gist.github.com/alexvicent/a48fd4ca081c7c610a8dbb0149c101f3

Opa Alex, meu chute.

Sua linha está assim:

<datasource jndi-name="java:jboss/datasources/allwebDS" pool-name="allwebDS">

Tenta fazer assim:

<datasource jndi-name="java:jboss/datasources/allwebDS" pool-name="allwebDS" enabled="true">

Agora apresentou isso: https://gist.github.com/alexvicent/f01f0eca2e4fd56af2e8a7b35e56ebe7

Já verifiquei a senha do banco e está de acordo com a configuração do datasource.

solução

Enfim consegui resolver o problema e subir o servidor.

O problema era que eu estava usando o MySQL Server na versão 8.0.11.0, porém a versão do meu mysql-connector-java era 5.1.35. Desinstalei o MySQL Server e instalei outro na versão 5.6.40 configurei o banco de novo e rodou!

Erro de principiante rsrs mas tá tudo certo agora! Obrigado!