-
1. Re: install MySQL Connector/J on wildfly 11 domain
andey Feb 14, 2018 11:24 PM (in response to harery)1 of 1 people found this helpfulConfigure JDBC Driver on WildFly 11
Mysql Connector 5.1.33 (Tested with MySQL Connector 5.1.39 and it worked)
1. Create the jboss module:
Enter in the file path ${EAP_HOME}/modules/system/layers/base and create the directories com/mysql/driver/main.
Into the folder main copy the driver(mysql-connector-java-5.1.33.jar) library jar, and create a file module.xml as showed in the sample below
<module xmlns="urn:jboss:module:1.3" name="com.mysql.driver">
<resources>
<resource-root path="mysql-connector-java-5.1.33.jar" />
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
</module>
For an explanation about the meaning of the fields take a look at Jboss Module Documentation.
2. Register the module as driver with CLI.
Start the server from the directory ${EAP_HOME}/bin and excute ./standalone.sh --server-config=${server-profile}
Start the management CLI by executing ./jboss-cli.sh (if you’re using windows, you should do it in cmd. Go to ${EAP_HOME}/bin, and execute jboss-cli)
Run the the command: /subsystem=datasources/jdbc-driver=mysql:add(driver-name=mysql,driver-module-name=com.mysql.driver,driver-class-name=com.mysql.jdbc.Driver)”
If the operation is successful then the message below will be shown
{"outcome" => "success"}
In addition, the code below should be added to standalone.xml
...
<driver name="mysql" module="com.mysql.driver">
<driver-class>com.mysql.jdbc.Driver</driver-class>
</driver>
...
See this link http://middlewaremagic.com/jboss/?p=872
-
2. Re: install MySQL Connector/J on wildfly 11 domain
harery Feb 15, 2018 5:45 AM (in response to andey)but this tutorial for standalone mode
i'm asking about the domain mode