Wildfly 8.0 will not load Module for MySQL Driver
akevinbailey Apr 17, 2014 1:38 AMI get the following error when I add the MySQL JDBC driver as a Wildfly module:
22:34:10,030 INFO [org.jboss.as.naming] (MSC service thread 1-12) JBAS011802: Starting Naming Service
22:34:10,032 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 28) JBAS014613: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "mysql")
]) - failure description: "JBAS010441: Failed to load module for driver [com.mysql.jdbc]"
I am running Windows 8.1 and and my Wildfly home directory is C:\Java\wildfly-8.0.0.Final. I created the directory C:\Java\wildfly-8.0.0.Final\modules\com\mysql\jdbc\main and placed the module.xml and mysql-connector-java-5.1.30-bin.jar files in this directory.
My module.xml is:
<?xml version="1.0" encoding="UTF-8"?> <!-- Custom MySQL module --AKB-- --> <module xmlns="urn:jboss:module:1.1" name="com.mysql.jdbc"> <resources> <resource-root path="mysql-connector-java-5.1.30-bin.jar"/> <!-- Insert resources here --> </resources> <dependencies> <module name="javax.api"/> <module name="javax.transaction.api"/> </dependencies> </module>
and the datasources subsystem portion of my standalone.xml is
<subsystem xmlns="urn:jboss:domain:datasources:2.0"> <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> <drivers> <driver name="h2" module="com.h2database.h2"> <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class> </driver> <driver name="mysql" module="com.mysql.jdbc"> <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class> </driver> </drivers> </datasources> </subsystem>
I can't figure out what I am doing wrong. Is there something I am missing? According to the documentation this should work.
Any assistance is greatly appreciated.