Am trying to run my JBOSS after Configuring mysql dependencies, but having this errors
09:49:00,138 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "TripTicketDS")
]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.data-source.java:jboss/datasources/TripTicketDS is missing [jboss.jdbc-driver.mysql]",
"jboss.driver-demander.java:jboss/datasources/TripTicketDS is missing [jboss.jdbc-driver.mysql]"
]}
09:49:00,149 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("data-source" => "TripTicketDS")
]) - failure description: {"WFLYCTL0180: Services with missing/unavailable dependencies" => [
"jboss.data-source.java:jboss/datasources/TripTicketDS is missing [jboss.jdbc-driver.mysql]",
"jboss.driver-demander.java:jboss/datasources/TripTicketDS is missing [jboss.jdbc-driver.mysql]",
"jboss.data-source.java:jboss/datasources/TripTicketDS is missing [jboss.jdbc-driver.mysql]"
]}
My standalone.xml configurations are as follows
<datasource jndi-name="java:jboss/datasources/TripTicketDS" pool-name="TripTicketDS" enabled="true" use-java-context="true">
<connection-url>jdbc:mysql://localhost:3306/trip_ticket</connection-url>
<driver>mysql</driver>
<security>
<user-name>root</user-name>
<password></password>
</security>
</datasource>
my SQL module.xml file looks like this
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.3" name="com.sql.mysql">
<resources>
<resource-root path="mysql-connector-java-5.1.39-bin.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
</dependencies>
</module>
Try creating the Module itself using the jboss-cli.sh command rather than manually writing the module.xml file. This is because when we use some text editors, they might append some hidden chars to our files. (Specially when we do a copy & paste in such editors)
[standalone@localhost:9990 /] module add --name=com.mysql.driver --dependencies=javax.api,javax.transaction.api --resources=/PATH/TO/mysql-connector-java-5.1.35.jar
[standalone@localhost:9990 /] :reload
{
"outcome" => "success",
"result" => undefined
}
After running above command you should see the module.xml generated in the following location: "wildfly-version.Final/modules/com/mysql/driver/main/module.xml"
Now create DataSource:
[standalone@localhost:9990 /] /subsystem=datasources/jdbc-driver=mysql/:add(driver-module-name=com.mysql.driver,driver-name=mysql,jdbc-compliant=false,driver-class-name=com.mysql.jdbc.Driver)
{"outcome" => "success"}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With