@Dayson_Rodrigues escreveu:
estou com problema ao começar a usar o Wildfly. realizei os seguintes Passos:
1 - Ja criei a pasta com/mysql/main. dentro dela coloquei o module.xml e o .jar do mysql
module.xml
<?xml version="1.0" encoding="UTF-8"?> <module xmlns="urn:jboss:module:1.3" name="com.mysql"> <resources> <resource-root path="mysql-connector-java-5.1.40-bin"/> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> <module name="javax.servlet.api" optional="true"/> </dependencies> </module>
3 - Adicionei uma configuração no standlone.xml
<datasource jndi-name="java:jboss/datasources/MySQL-DS" pool-name="MYSQL" enabled="true" use-java-context="true"> <connection-url>jdbc:mysql://localhost:3306/oficina</connection-url> <driver>mysql</driver> <security> <user-name>root</user-name> <password>root</password> </security> </datasource>
4 - adicionei um driver
<driver name="mysql" module="com.mysql"> <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class> </driver>
5 - erro
23:51:16,529 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 33) WFLYCTL0013: Operation ("add") failed - address: ([ ("subsystem" => "datasources"), ("jdbc-driver" => "mysql") ]) - failure description: "WFLYJCA0041: Failed to load module for driver [com.mysql]" 23:51:19,597 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([ ("subsystem" => "datasources"), ("data-source" => "MYSQL") ]) - failure description: { "WFLYCTL0412: Required services that are not installed:" => ["jboss.jdbc-driver.mysql"], "WFLYCTL0180: Services with missing/unavailable dependencies" => [ "org.wildfly.data-source.MYSQL is missing [jboss.jdbc-driver.mysql]", "jboss.driver-demander.java:jboss/datasources/MySQL-DS is missing [jboss.jdbc-driver.mysql]" ] } 23:51:19,611 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([ ("subsystem" => "datasources"), ("data-source" => "MYSQL") ]) - failure description: { "WFLYCTL0412: Required services that are not installed:" => [ "jboss.jdbc-driver.mysql", "jboss.jdbc-driver.mysql" ], "WFLYCTL0180: Services with missing/unavailable dependencies" => [ "org.wildfly.data-source.MYSQL is missing [jboss.jdbc-driver.mysql]", "jboss.driver-demander.java:jboss/datasources/MySQL-DS is missing [jboss.jdbc-driver.mysql]", "org.wildfly.data-source.MYSQL is missing [jboss.jdbc-driver.mysql]" ] } 23:51:19,672 INFO [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report WFLYCTL0184: New missing/unsatisfied dependencies: service jboss.jdbc-driver.mysql (missing) dependents: [service org.wildfly.data-source.MYSQL, service jboss.driver-demander.java:jboss/datasources/MySQL-DS] 23:51:19,899 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://127.0.0.1:9990/management 23:51:19,899 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://127.0.0.1:9990 23:51:19,900 ERROR [org.jboss.as] (Controller Boot Thread) WFLYSRV0026: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) started (with errors) in 7102ms - Started 332 of 583 services (4 services failed or missing dependencies, 394 services are lazy, passive or on-demand)
Mensagens: 6
Participantes: 2