Hi folks,
I tried to solve this by checking the following topics (Configure MySQL Database) and (XA Datasource for Application Data Mysql) but this is not clear. I’m currently working with MySQL Percona and I’d like to connect with Camunda Wildfly (20.0.1) to it. However, I’m getting some exceptions on the start up.
Log exception:
{noformat}
20:07:43,072 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (“add”) failed - address: ([
(“subsystem” => “datasources”),
(“data-source” => “ExampleDS”)
]) - failure description: {
“WFLYCTL0412: Required services that are not installed:” => [“jboss.jdbc-driver.h2”],
“WFLYCTL0180: Services with missing/unavailable dependencies” => [
“org.wildfly.data-source.ExampleDS is missing [jboss.jdbc-driver.h2]”,
“jboss.driver-demander.java:jboss/datasources/ExampleDS is missing [jboss.jdbc-driver.h2]”
]
}
20:07:43,073 ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation (“add”) failed - address: ([
(“subsystem” => “datasources”),
(“xa-data-source” => “camunda_engine”)
]) - failure description: {
“WFLYCTL0412: Required services that are not installed:” => [“jboss.jdbc-driver.mysql-connector-java-8_0_23-bin_jar_com_mysql_jdbc_Driver”],
“WFLYCTL0180: Services with missing/unavailable dependencies” => [
“jboss.driver-demander.java:/camunda_engine is missing [jboss.jdbc-driver.mysql-connector-java-8_0_23-bin_jar_com_mysql_jdbc_Driver]”,
“org.wildfly.data-source.camunda_engine is missing [jboss.jdbc-driver.mysql-connector-java-8_0_23-bin_jar_com_mysql_jdbc_Driver]”
]
}
{noformat}
As you can see, since I included the xa-data-source configuration, even my internal H2 is failing to start.
Now my configuration:
- My standalone.xml
{noformat}
jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
h2
sa
jdbc:mysql:sequential://172.30.199.73:3306,172.30.199.74:3306,172.30.199.75:3306/camunda-engine;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
mysql
TRANSACTION_READ_COMMITTED
camunda
camundaPass
com.mysql.cj.jdbc.Driver
{noformat}
I also tried to use the jboss-cli but “without” success:
{noformat}
[camunda@usr-jzoc-apiuatcam02 bin]$ ./jboss-cli.sh -c
[standalone@localhost:9990 /] module add --name=com.mysql --resources=/opt/camunda/lib/mysql-connector-java-8.0.23.jar --dependencies=javax.api,javax.transaction.api
[standalone@localhost:9990 /] /subsystem =datasources /jdbc-driver =mysql:add(driver-name=mysql,driver-module-name=com.mysql)
{“outcome” => “success”}
[standalone@localhost:9990 /] data-source add --jndi-name=java:/camunda_engine --name=camunda_engine --connection-url=jdbc:mysql:sequential://172.30.199.73:3306,172.30.199.74:3306,172.30.199.75:3306/camunda_engine --driver-name=mysql --user-name=camunda --password=camundaPass
{“WFLYCTL0062: Composite operation failed and was rolled back. Steps that failed:” => {“Operation step-1” => “WFLYCTL0
436: Cannot register capability ‘org.wildfly.data-source.camunda_engine’ at location ‘[
("subsystem" => "datasources"),
("data-source" => "camunda_engine")
]’ as it is already registered in context ‘global’ at location(s) ‘[[
("subsystem" => "datasources"),
("xa-data-source" => "camunda_engine")
]]’”}}
{noformat}
Database information:
{noformat}
mysql> show variables like ‘%version%’;
±-------------------------±------------------------------------------------------------------------------------+
| Variable_name | Value |
±-------------------------±------------------------------------------------------------------------------------+
| admin_tls_version | TLSv1,TLSv1.1,TLSv1.2 |
| immediate_server_version | 999999 |
| innodb_version | 8.0.21-12 |
| original_server_version | 999999 |
| protocol_version | 10 |
| slave_type_conversions | |
| tls_version | TLSv1,TLSv1.1,TLSv1.2 |
| version | 8.0.21-12.1 |
| version_comment | Percona XtraDB Cluster (GPL), Release rel12, Revision 4d973e2, WSREP version 26.4.3 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
| version_compile_zlib | 1.2.7 |
| version_suffix | .1 |
±-------------------------±------------------------------------------------------------------------------------+
13 rows in set (0.01 sec)
{noformat}
Now, a few questions:
- I didn’t find in the documentation where should I exactly drop the database driver inside Camunda. However, as I found mybatis-3.5.3.jar in the [CAMUNDA_HOME]/lib, I dropped my mysql-connector-java-8.0.23.jar in there, is this correct? By the way, I noticed my driver is newer than my database version but I don’t believe this is the issue.
2)What’s the difference between standalone.xml and standalone-ha.xml? As I’m deploying two Camunda Wildflys in parallel, should I use standalone-ha.xml? - For now, the WAR files will contens the Java and BPMN/DMNs. I’m not considering bootstrapping the applications. Is there any problem on that?
Thanks,
Andrey