JBoss error: org.jboss.as.controller.management-operation] (Controller bootstrap)

I am trying to start JBOSS after setting mysql dependencies, but with these 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 is as follows

 <?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> 
+5
source share
2 answers

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 can add some hidden characters to our files. (Specially, when we make a copy and paste into 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 starting over the command, you will see the module.xml file created in the following location: "wildfly-version.Final/modules/com/mysql/driver/main/module.xml"

Now create a 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"} 
+1
source

Invalid driver name. It should be the same as the name of your module, com.sql.mysql .

Instead of editing XML, I would suggest using the CLI or web console to add a data source. Using the CLI, you can also add a module.

 module add --name=com.mysql --resources=~/Downloads/mysql-connector-java-5.1.37/mysql-connector-java-5.1.37-bin.jar --dependencies=javax.api,javax.transaction.api /subsystem=datasources/jdbc-driver=com.mysql:add(driver-name=com.mysql, driver-module-name=com.mysql, driver-xa-datasource-class-name=com.mysql.jdbc.jdbc2.optional.MysqlXADataSource) /subsystem=datasources/data-source=TripTicketDS:add(driver-name=com.mysql, jndi-name="java:jboss/datasources/TripTicketDS", enabled=true, connection-url="jdbc:mysql://localhost:3306/trip_ticket", user-name=root, password="mypassword") 
0
source

All Articles