Estou tentando subir o servidor wildfly no curso de EJB mas o seguinte erro me é retornado:
08:51:08,210 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "livraria.war")]) - failure description: {
"WFLYCTL0412: Required services that are not installed:" => ["jboss.naming.context.java.jboss.datasources.livrariaDS"],
"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.persistenceunit.\"livraria.war#livrariads\".__FIRST_PHASE__ is missing [jboss.naming.context.java.jboss.datasources.livrariaDS]",
"jboss.persistenceunit.\"livraria.war#livrariads\" is missing [jboss.naming.context.java.jboss.datasources.livrariaDS]"
]
}
08:51:08,248 INFO [org.jboss.as.server] (ServerService Thread Pool -- 34) WFLYSRV0010: Deployed "livraria.war" (runtime-name : "livraria.war")
08:51:08,251 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0184: New missing/unsatisfied dependencies:
service jboss.naming.context.java.jboss.datasources.livrariaDS (missing) dependents: [service jboss.persistenceunit."livraria.war#livrariads".__FIRST_PHASE__, service jboss.persistenceunit."livraria.war#livrariads"]
Fiz todas as configurações que dizem no curso e ainda sim não funciona,
Segue o Standalone.xml
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE</connection-url>
<driver>h2</driver>
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
</datasource>
<datasource jndi-name="java:jboss/datasources/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>root</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
<driver name="com.mysql" module="com.mysql">
<xa-datasource-class>
com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
</xa-datasource-class>
</driver>
</drivers>
</datasources>
Segue o persistence.xml
<persistence-unit name="livrariads">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>java:jboss/datasources/livrariaDS</jta-data-source>
<class>br.com.caelum.livraria.modelo.Autor</class>
<class>br.com.caelum.livraria.modelo.Livro</class>
<class>br.com.caelum.livraria.modelo.Usuario</class>
Toda ajuda é bem vinda,
ATT, Pedro