如何进行flowable工作流引擎Table'flowable.act_ge_property'doesn'texist问题分析

如何进行flowable工作流引擎Table 'flowable.act_ge_property' doesn't exist 问题分析,针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。

为晋江等地区用户提供了全套网页设计制作服务,及晋江网站建设行业解决方案。主营业务为网站设计制作、网站设计、晋江网站设计,以传统方式定制建设网站,并提供域名空间备案等一条龙服务,秉承以专业、用心的态度为用户提供真诚的服务。我们深信只要达到每一位用户的要求,就会得到认可,从而选择与我们长期合作。这样,我们也可以走得更远!

在搭建 flowable 6.5.1.7  开发环境的时候,发现报  flowable.act_ge_property 无法找到的错误

020-09-02 23:48:39.632  INFO 13456 --- [  restartedMain] o.f.s.SpringProcessEngineConfiguration   : Executing configure() of class org.flowable.eventregistry.spring.configurator.SpringEventRegistryConfigurator (priority:100000)
2020-09-02 23:56:09.886  WARN 13456 --- [l-1 housekeeper] com.zaxxer.hikari.pool.HikariPool        : HikariPool-1 - Thread starvation or clock leap detected (housekeeper delta=7m31s230ms508µs700ns).
2020-09-02 23:56:11.432 ERROR 13456 --- [  restartedMain] o.f.c.e.impl.db.CommonDbSchemaManager    : Could not get property from table ACT_GE_PROPERTY

java.sql.SQLSyntaxErrorException: Table 'flowable.act_ge_property' doesn't exist
	at com.MySQL.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120) ~[mysql-connector-java-8.0.21.jar:8.0.21]
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97) ~[mysql-connector-java-8.0.21.jar:8.0.21]
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.21.jar:8.0.21]
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[mysql-connector-java-8.0.21.jar:8.0.21]
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003) ~[mysql-connector-java-8.0.21.jar:8.0.21]
	at com.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52) ~[HikariCP-3.4.5.jar:na]
	at com.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java) ~[HikariCP-3.4.5.jar:na]
	at org.flowable.common.engine.impl.db.AbstractSqlScriptBasedDbSchemaManager.getProperty(AbstractSqlScriptBasedDbSchemaManager.java:193) ~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]
	at org.flowable.common.engine.impl.db.ServiceSqlScriptBasedDbSchemaManager.getSchemaVersion(ServiceSqlScriptBasedDbSchemaManager.java:111) ~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]
	at org.flowable.common.engine.impl.db.ServiceSqlScriptBasedDbSchemaManager.schemaUpdate(ServiceSqlScriptBasedDbSchemaManager.java:67) ~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]
	at org.flowable.eventregistry.impl.db.EventDbSchemaManager.schemaUpdate(EventDbSchemaManager.java:62) ~[flowable-event-registry-6.5.1.7.jar:6.5.1.7]
	at org.flowable.common.engine.impl.db.LiquibaseBasedSchemaManager.initSchema(LiquibaseBasedSchemaManager.java:61) ~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]
	at org.flowable.eventregistry.impl.db.EventDbSchemaManager.initSchema(EventDbSchemaManager.java:36) ~[flowable-event-registry-6.5.1.7.jar:6.5.1.7]
	at org.flowable.eventregistry.impl.cmd.SchemaOperationsEventRegistryEngineBuild.execute(SchemaOperationsEventRegistryEngineBuild.java:29) ~[flowable-event-registry-6.5.1.7.jar:6.5.1.7]
	at org.flowable.eventregistry.impl.cmd.SchemaOperationsEventRegistryEngineBuild.execute(SchemaOperationsEventRegistryEngineBuild.java:24) ~[flowable-event-registry-6.5.1.7.jar:6.5.1.7]
	at org.flowable.common.engine.impl.interceptor.DefaultCommandInvoker.execute(DefaultCommandInvoker.java:22) ~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]
	at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53) ~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]
	at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:72) ~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]
	at org.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:56) ~[flowable-spring-common-6.5.1.7.jar:6.5.1.7]
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:56) ~[flowable-spring-common-6.5.1.7.jar:6.5.1.7]
	at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) ~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]
	at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56) ~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]
	at org.flowable.eventregistry.impl.EventRegistryEngineImpl.(EventRegistryEngineImpl.java:47) ~[flowable-event-registry-6.5.1.7.jar:6.5.1.7]
	at org.flowable.eventregistry.impl.EventRegistryEngineConfiguration.buildEventRegistryEngine(EventRegistryEngineConfiguration.java:190) ~[flowable-event-registry-6.5.1.7.jar:6.5.1.7]
	at org.flowable.eventregistry.spring.SpringEventRegistryEngineConfiguration.buildEventRegistryEngine(SpringEventRegistryEngineConfiguration.java:72) ~[flowable-event-registry-spring-6.5.1.7.jar:6.5.1.7]
	at org.flowable.eventregistry.spring.configurator.SpringEventRegistryConfigurator.initEventRegistryEngine(SpringEventRegistryConfigurator.java:59) ~[flowable-event-registry-spring-configurator-6.5.1.7.jar:6.5.1.7]
	at org.flowable.eventregistry.spring.configurator.SpringEventRegistryConfigurator.configure(SpringEventRegistryConfigurator.java:49) ~[flowable-event-registry-spring-configurator-6.5.1.7.jar:6.5.1.7]
	at org.flowable.common.engine.impl.AbstractEngineConfiguration.configuratorsAfterInit(AbstractEngineConfiguration.java:1030) ~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]
	at org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:1079) ~[flowable-engine-6.5.1.7.jar:6.5.1.7]
	at org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:972) ~[flowable-engine-6.5.1.7.jar:6.5.1.7]
	at org.flowable.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:75) ~[flowable-spring-6.5.1.7.jar:6.5.1.7]
	at org.flowable.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:60) ~[flowable-spring-6.5.1.7.jar:6.5.1.7]
	at org.flowable.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32) ~[flowable-spring-6.5.1.7.jar:6.5.1.7]
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:101) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1827) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1265) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1532) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1489) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1270) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:538) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897) ~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) ~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) ~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) ~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]
	at com.jxlgzwh.flowablemodeler.FlowableModelerApplication.main(FlowableModelerApplication.java:15) ~[classes/:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:na]
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:na]
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:na]
	at java.base/java.lang.reflect.Method.invoke(Method.java:566) ~[na:na]
	at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) ~[spring-boot-devtools-2.3.3.RELEASE.jar:2.3.3.RELEASE]

2020-09-02 23:56:11.434  INFO 13456 --- [  restartedMain] o.f.c.e.impl.db.CommonDbSchemaManager    : upgrading flowable common schema from 6.1.2.0 to 6.5.1.5
2020-09-02 23:56:11.434  INFO 13456 --- [  restartedMain] o.f.c.e.impl.db.CommonDbSchemaManager    : Upgrade needed: 6120 -> 6200. Looking for schema update resource for component 'common'
2020-09-02 23:56:11.434  INFO 13456 --- [  restartedMain] o.f.c.e.impl.db.CommonDbSchemaManager    : performing upgrade on common with resource org/flowable/common/db/upgrade/flowable.all.upgradestep.6120.to.6200.common.sql
2020-09-02 23:56:11.435  INFO 13456 --- [  restartedMain] o.f.c.e.impl.db.CommonDbSchemaManager    : Found MySQL: majorVersion=5 minorVersion=7
2020-09-02 23:56:11.439 ERROR 13456 --- [  restartedMain] o.f.c.e.impl.db.CommonDbSchemaManager    : problem during schema upgrade, statement insert into ACT_GE_PROPERTY values ('common.schema.version', '6.2.0.0', 1)

由于在引擎配置类已经配置了 shcemeUpdate 为 true ,表应该自动创建

springProcessEngineConfiguration.setDatabaseSchemaUpdate("true");

如何进行flowable工作流引擎Table 'flowable.act_ge_property' doesn't exist 问题分析

主要是由于 ProcessDbSchemaManager 类的 schemaUpdate 方法

更新的时候,设置databaseSchemaUpdate=true的时候, 代码逻辑走更新逻辑,使用isEngineTablePresent来判断是否存在

如何进行flowable工作流引擎Table 'flowable.act_ge_property' doesn't exist 问题分析

isEngineTablePresent 判断逻辑如下:

    public boolean isEngineTablePresent() {
        return isTablePresent("ACT_RU_EXECUTION");
    }

核心代码 走 jdbc 的 getTables 方法来进行判断

如何进行flowable工作流引擎Table 'flowable.act_ge_property' doesn't exist 问题分析

因为 mysql数据库中部署过Flowable 工程,后面搭建环境的时候把表删除了,所以当schema为空时,查找mysql的元数据的时候搜索到了历史表,但是不在当前连接数据库中,代码逻辑以为表已经有了,其实还是历史的表,基本上找到原因了
mysql 8.0 版本驱动将参数 nullCatalogMeansCurrent 的默认值由true改为了false,如果使用DatabaseMetaData.getTables获取所有的表信息,包含了历史表记录,导致误判。

解决方案一
把正常的数据库的表导出为sql,手动创建表。

解决方案二
mysql的连接字符串中添加上nullCatalogMeansCurrent=true,设置为只查当前连接的schema库。

server:
  port: 8080
spring:
  datasource:
    driver-class-name: com.mysql.jdbc.Driver
    url: jdbc:mysql://127.0.0.1:3306/flowable?characterEncoding=UTF-8&serverTimezone=UTC&useUnicode=true&useSSL=false&nullCatalogMeansCurrent=true
    username: root
    password:

关于如何进行flowable工作流引擎Table 'flowable.act_ge_property' doesn't exist 问题分析问题的解答就分享到这里了,希望以上内容可以对大家有一定的帮助,如果你还有很多疑惑没有解开,可以关注创新互联行业资讯频道了解更多相关知识。


分享题目:如何进行flowable工作流引擎Table'flowable.act_ge_property'doesn'texist问题分析
文章转载:http://ybzwz.com/article/ihides.html