如何修复 "tables are already present using metadata" camunda 进程引擎异常?

How to fix the "tables are already present using metadata" camunda process engine exception?

我正在使用 wildfly 14.0.1 应用程序服务器和 Camunda V 7.11.0。我配置了 mysql db 而不是默认的 camunda h2 db,并将以下数据源添加到 standalone.xml 文件中。但是我在部署时遇到以下异常。如何修复此异常?

<datasources>
                     <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
                    <connection-url>jdbc:mysql://127.0.0.1:3306/camunda11?jdbcCompliantTruncation=false</connection-url>
                    <driver>mysql</driver>
                    <security>
                        <user-name>root</user-name>
                        <password>password</password>
                    </security>
                </datasource>
                <datasource jta="true" jndi-name="java:jboss/datasources/ProcessEngine" pool-name="ProcessEngine" enabled="true" use-java-context="true" use-ccm="true">
                    <connection-url>jdbc:mysql://127.0.0.1:3306/camunda11?sessionVariables=sql_mode='NO_ENGINE_SUBSTITUTION'&amp;jdbcCompliantTruncation=false</connection-url>
                    <driver>mysql</driver>
                    <security>
                        <user-name>root</user-name>
                        <password>password</password>
                    </security>
                    <validation>
                        <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLValidConnectionChecker"/>
                        <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.mysql.MySQLExceptionSorter"/>
                    </validation>
                </datasource>
11:47:10,206 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 72) MSC000001: Failed to start service org.camunda.bpm.platform.process-engine.default: org.jboss.msc.service.StartException in service org.camunda.bpm.platform.process-engine.default: org.camunda.bpm.engine.ProcessEngineException: ENGINE-03018 Could not check if tables are already present using metadata.
    at org.camunda.bpm.wildfly.camunda-wildfly-subsystem@7.11.0//org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.run(MscManagedProcessEngineController.java:98)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at org.jboss.threads@2.3.2.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
    at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
    at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
    at org.jboss.threads@2.3.2.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1349)
    at java.base/java.lang.Thread.run(Thread.java:834)
    at org.jboss.threads@2.3.2.Final//org.jboss.threads.JBossThread.run(JBossThread.java:485)
Caused by: org.camunda.bpm.engine.ProcessEngineException: ENGINE-03018 Could not check if tables are already present using metadata.
    at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.checkDatabaseTableException(EnginePersistenceLogger.java:241)
    at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.db.sql.DbSqlSession.isTablePresent(DbSqlSession.java:494)
    at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.db.sql.DbSqlSession.isEngineTablePresent(DbSqlSession.java:434)
    at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.db.AbstractPersistenceSession.dbSchemaUpdate(AbstractPersistenceSession.java:218)
    at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:56)
    at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.SchemaOperationsProcessEngineBuild.execute(SchemaOperationsProcessEngineBuild.java:34)
    at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28)
    at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:107)
    at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:33)
    at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:120)
    at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.ProcessEngineImpl.<init>(ProcessEngineImpl.java:93)
    at org.camunda.bpm.camunda-engine@7.11.0//org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:798)
    at org.camunda.bpm.wildfly.camunda-wildfly-subsystem@7.11.0//org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.startProcessEngine(MscManagedProcessEngineController.java:178)
    at org.camunda.bpm.wildfly.camunda-wildfly-subsystem@7.11.0//org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.run(MscManagedProcessEngineController.java:132)
    at org.camunda.bpm.wildfly.camunda-wildfly-subsystem@7.11.0//org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.run(MscManagedProcessEngineController.java:130)
    at org.camunda.bpm.wildfly.camunda-wildfly-subsystem@7.11.0//org.camunda.bpm.container.impl.jboss.util.Tccl.runWithTccl(Tccl.java:54)
    at org.camunda.bpm.wildfly.camunda-wildfly-subsystem@7.11.0//org.camunda.bpm.container.impl.jboss.util.Tccl.runUnderClassloader(Tccl.java:46)
    at org.camunda.bpm.wildfly.camunda-wildfly-subsystem@7.11.0//org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.startInternal(MscManagedProcessEngineController.java:130)
    at org.camunda.bpm.wildfly.camunda-wildfly-subsystem@7.11.0//org.camunda.bpm.container.impl.jboss.service.MscManagedProcessEngineController.run(MscManagedProcessEngineController.java:91)
    ... 8 more
Caused by: org.apache.ibatis.exceptions.PersistenceException: 

我使用了mysql-connector-java-5.1.44.jar而不是5.1.6版本来修复异常。