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

Erro Build Jboss

18:41:33,294 INFO  [org.jboss.weld.deployer] (MSC service thread 1-7) JBAS016005: Starting Services for CDI deployment: livraria.war
18:41:33,294 INFO  [org.jboss.weld.Version] (MSC service thread 1-7) WELD-000900 1.1.5 (AS71)
18:41:33,341 INFO  [org.jboss.as] (MSC service thread 1-6) JBAS015951: Admin console listening on http://127.0.0.1:9990
18:41:33,341 ERROR [org.jboss.as] (MSC service thread 1-6) JBAS015875: JBoss AS 7.1.1.Final "Brontes" started (with errors) in 24977ms - Started 204 of 312 services (30 services failed or missing dependencies, 76 services are passive or on-demand)
18:41:33,560 INFO  [org.jboss.as.server] (DeploymentScanner-threads - 2) JBAS015870: Deploy of deployment "livraria.war" was rolled back with failure message {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"livraria.war#livraria\"jboss.naming.context.java.livrariaDSMissing[jboss.persistenceunit.\"livraria.war#livraria\"jboss.naming.context.java.livrariaDS]"]}
18:41:33,607 INFO  [org.jboss.as.server.deployment] (MSC service thread 1-2) JBAS015877: Stopped deployment livraria.war in 51ms
18:41:33,607 INFO  [org.jboss.as.controller] (DeploymentScanner-threads - 2) JBAS014774: Service status report
JBAS014775:    New missing/unsatisfied dependencies:
      service jboss.naming.context.java.livrariaDS (missing) dependents: [service jboss.persistenceunit."livraria.war#livraria"] 

18:41:33,607 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 1) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014771: Services with missing/unavailable dependencies" => ["jboss.persistenceunit.\"livraria.war#livraria\"jboss.naming.context.java.livrariaDSMissing[jboss.persistenceunit.\"livraria.war#livraria\"jboss.naming.context.java.livrariaDS]"]}}}

Alguém pode me dar uma idéia de como posso resolver isso?

  • Já dei o clean no projeto e no servidor
2 respostas

Oi Lucas, tudo bem?

No arquivo standalone.xml do seu JBoss AS 7.1.1.Final provavelmente está faltando a configuração do data source livrariaDS :

<datasource jndi-name="java:/livrariaDS" pool-name="livrariaDS"
    enabled="true" use-java-context="true">

    <connection-url>jdbc:mysql://localhost:3306/livraria</connection-url>
    <driver>com.mysql</driver>
    <pool>
        <min-pool-size>10</min-pool-size>
        <max-pool-size>100</max-pool-size>
        <prefill>true</prefill>
    </pool>
    <security>
        <user-name>root</user-name>
        <password></password>
    </security>
</datasource>

Dá uma olhada nessa aula: https://cursos.alura.com.br/course/ejb/task/4837

Abraço!

Se não funcionar, tenta trocar a tag datasource para que fique assim:

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

(parece que precisa do /datasources/ no jndi-name