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

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

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

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

020-09-0223:48:39.632INFO13456---[restartedMain]o.f.s.SpringProcessEngineConfiguration:Executingconfigure()ofclassorg.flowable.eventregistry.spring.configurator.SpringEventRegistryConfigurator(priority:100000)2020-09-0223:56:09.886WARN13456---[l-1housekeeper]com.zaxxer.hikari.pool.HikariPool:HikariPool-1-Threadstarvationorclockleapdetected(housekeeperdelta=7m31s230ms508µs700ns).2020-09-0223:56:11.432ERROR13456---[restartedMain]o.f.c.e.impl.db.CommonDbSchemaManager:CouldnotgetpropertyfromtableACT_GE_PROPERTYjava.sql.SQLSyntaxErrorException:Table'flowable.act_ge_property'doesn'texistatcom.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)~[mysql-connector-java-8.0.21.jar:8.0.21]atcom.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)~[mysql-connector-java-8.0.21.jar:8.0.21]atcom.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)~[mysql-connector-java-8.0.21.jar:8.0.21]atcom.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953)~[mysql-connector-java-8.0.21.jar:8.0.21]atcom.mysql.cj.jdbc.ClientPreparedStatement.executeQuery(ClientPreparedStatement.java:1003)~[mysql-connector-java-8.0.21.jar:8.0.21]atcom.zaxxer.hikari.pool.ProxyPreparedStatement.executeQuery(ProxyPreparedStatement.java:52)~[HikariCP-3.4.5.jar:na]atcom.zaxxer.hikari.pool.HikariProxyPreparedStatement.executeQuery(HikariProxyPreparedStatement.java)~[HikariCP-3.4.5.jar:na]atorg.flowable.common.engine.impl.db.AbstractSqlScriptBasedDbSchemaManager.getProperty(AbstractSqlScriptBasedDbSchemaManager.java:193)~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]atorg.flowable.common.engine.impl.db.ServiceSqlScriptBasedDbSchemaManager.getSchemaVersion(ServiceSqlScriptBasedDbSchemaManager.java:111)~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]atorg.flowable.common.engine.impl.db.ServiceSqlScriptBasedDbSchemaManager.schemaUpdate(ServiceSqlScriptBasedDbSchemaManager.java:67)~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]atorg.flowable.eventregistry.impl.db.EventDbSchemaManager.schemaUpdate(EventDbSchemaManager.java:62)~[flowable-event-registry-6.5.1.7.jar:6.5.1.7]atorg.flowable.common.engine.impl.db.LiquibaseBasedSchemaManager.initSchema(LiquibaseBasedSchemaManager.java:61)~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]atorg.flowable.eventregistry.impl.db.EventDbSchemaManager.initSchema(EventDbSchemaManager.java:36)~[flowable-event-registry-6.5.1.7.jar:6.5.1.7]atorg.flowable.eventregistry.impl.cmd.SchemaOperationsEventRegistryEngineBuild.execute(SchemaOperationsEventRegistryEngineBuild.java:29)~[flowable-event-registry-6.5.1.7.jar:6.5.1.7]atorg.flowable.eventregistry.impl.cmd.SchemaOperationsEventRegistryEngineBuild.execute(SchemaOperationsEventRegistryEngineBuild.java:24)~[flowable-event-registry-6.5.1.7.jar:6.5.1.7]atorg.flowable.common.engine.impl.interceptor.DefaultCommandInvoker.execute(DefaultCommandInvoker.java:22)~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]atorg.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53)~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]atorg.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:72)~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]atorg.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:56)~[flowable-spring-common-6.5.1.7.jar:6.5.1.7]atorg.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)~[spring-tx-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:56)~[flowable-spring-common-6.5.1.7.jar:6.5.1.7]atorg.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]atorg.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56)~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]atorg.flowable.eventregistry.impl.EventRegistryEngineImpl.<init>(EventRegistryEngineImpl.java:47)~[flowable-event-registry-6.5.1.7.jar:6.5.1.7]atorg.flowable.eventregistry.impl.EventRegistryEngineConfiguration.buildEventRegistryEngine(EventRegistryEngineConfiguration.java:190)~[flowable-event-registry-6.5.1.7.jar:6.5.1.7]atorg.flowable.eventregistry.spring.SpringEventRegistryEngineConfiguration.buildEventRegistryEngine(SpringEventRegistryEngineConfiguration.java:72)~[flowable-event-registry-spring-6.5.1.7.jar:6.5.1.7]atorg.flowable.eventregistry.spring.configurator.SpringEventRegistryConfigurator.initEventRegistryEngine(SpringEventRegistryConfigurator.java:59)~[flowable-event-registry-spring-configurator-6.5.1.7.jar:6.5.1.7]atorg.flowable.eventregistry.spring.configurator.SpringEventRegistryConfigurator.configure(SpringEventRegistryConfigurator.java:49)~[flowable-event-registry-spring-configurator-6.5.1.7.jar:6.5.1.7]atorg.flowable.common.engine.impl.AbstractEngineConfiguration.configuratorsAfterInit(AbstractEngineConfiguration.java:1030)~[flowable-engine-common-6.5.1.7.jar:6.5.1.7]atorg.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.init(ProcessEngineConfigurationImpl.java:1079)~[flowable-engine-6.5.1.7.jar:6.5.1.7]atorg.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:972)~[flowable-engine-6.5.1.7.jar:6.5.1.7]atorg.flowable.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:75)~[flowable-spring-6.5.1.7.jar:6.5.1.7]atorg.flowable.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:60)~[flowable-spring-6.5.1.7.jar:6.5.1.7]atorg.flowable.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32)~[flowable-spring-6.5.1.7.jar:6.5.1.7]atorg.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:101)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1827)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1265)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1532)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1489)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1270)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1227)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:884)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:788)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:538)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1336)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1176)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:556)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:516)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:324)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:226)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:322)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:202)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:897)~[spring-beans-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:879)~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:551)~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]atorg.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143)~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:758)~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]atorg.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]atorg.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:315)~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1237)~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]atorg.springframework.boot.SpringApplication.run(SpringApplication.java:1226)~[spring-boot-2.3.3.RELEASE.jar:2.3.3.RELEASE]atcom.jxlgzwh.flowablemodeler.FlowableModelerApplication.main(FlowableModelerApplication.java:15)~[classes/:na]atjava.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(NativeMethod)~[na:na]atjava.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)~[na:na]atjava.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)~[na:na]atjava.base/java.lang.reflect.Method.invoke(Method.java:566)~[na:na]atorg.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49)~[spring-boot-devtools-2.3.3.RELEASE.jar:2.3.3.RELEASE]2020-09-0223:56:11.434INFO13456---[restartedMain]o.f.c.e.impl.db.CommonDbSchemaManager:upgradingflowablecommonschemafrom6.1.2.0to6.5.1.52020-09-0223:56:11.434INFO13456---[restartedMain]o.f.c.e.impl.db.CommonDbSchemaManager:Upgradeneeded:6120->6200.Lookingforschemaupdateresourceforcomponent'common'2020-09-0223:56:11.434INFO13456---[restartedMain]o.f.c.e.impl.db.CommonDbSchemaManager:performingupgradeoncommonwithresourceorg/flowable/common/db/upgrade/flowable.all.upgradestep.6120.to.6200.common.sql2020-09-0223:56:11.435INFO13456---[restartedMain]o.f.c.e.impl.db.CommonDbSchemaManager:FoundMySQL:majorVersion=5minorVersion=72020-09-0223:56:11.439ERROR13456---[restartedMain]o.f.c.e.impl.db.CommonDbSchemaManager:problemduringschemaupgrade,statementinsertintoACT_GE_PROPERTYvalues('common.schema.version','6.2.0.0',1)

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

springProcessEngineConfiguration.setDatabaseSchemaUpdate("true");

主要是由于 ProcessDbSchemaManager 类的schemaUpdate 方法

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

isEngineTablePresent 判断逻辑如下:

publicbooleanisEngineTablePresent(){returnisTablePresent("ACT_RU_EXECUTION");}

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

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

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

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

server:port:8080spring:datasource:driver-class-name:com.mysql.jdbc.Driverurl:jdbc:mysql://127.0.0.1:3306/flowable?characterEncoding=UTF-8&serverTimezone=UTC&useUnicode=true&useSSL=false&nullCatalogMeansCurrent=trueusername:rootpassword:

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

发布于 2021-12-28 22:16:25
收藏
分享
海报
0 条评论
49
上一篇:怎么实现laravel管道及中间件源码分析 下一篇:如何进行spring中的默认标签源码解析
目录

    0 条评论

    本站已关闭游客评论,请登录或者注册后再评论吧~

    忘记密码?

    图形验证码