Downloaded 9.0.0 version and trying to setup the usage of my local instance of DB. Based on the documentation created mysql/main folder under
modules/system/layers/keycloak/org
with module.xml and mysql-connector-java.8.0.19.jar
module.xml
<?xml version="1.0" encoding="UTF-8"?>
<resources>
<resource-root path="mysql-connector-java-8.0.19.jar"/>
</resources>
<dependencies>
<module name="javax.api"/>
<module name="javax.transaction.api"/>
</dependencies>
in standalone.xml added
<drivers>
<driver name="mysql" module="org.mysql">
<xa-datasource-class>com.mysql.cj.jdbc.Driver</xa-datasource-class>
</driver>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
</drivers>
and datasource as
<datasource jndi-name="java:jboss/datasources/MySQL" pool-name="MySQL" enabled="true" use-java-context="true" statistics-enabled="${wildfly.datasources.statistics-enabled:${wildfly.statistics-enabled:false}}">
<connection-url>jdbc:mariadb://localhost:13333/keycloak</connection-url>
<driver>mysql</driver>
<security>
<user-name>root</user-name>
<password>password</password>
</security>
</datasource>
when start via: sh standalone.sh getting:
10:01:17,667 ERROR [org.jboss.as.controller.management-operation] (ServerService Thread Pool -- 32) WFLYCTL0013: Operation ("add") failed - address: ([
("subsystem" => "datasources"),
("jdbc-driver" => "mysql")
]) - failure description: âWFLYJCA0114: Failed to load datasource class: com.mysql.cj.jdbc.Driverâ
and
10:01:31,559 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 is missing [jboss.jdbc-driver.mysql]â
]
}
10:01:31,612 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 is missing [jboss.jdbc-driver.mysql]â,
âorg.wildfly.data-source.MySQL is missing [jboss.jdbc-driver.mysql]â
]
}
what I am missing / doing wrong ?