如何進(jìn)行flowable工作流引擎Table 'flowable.act_ge_property' doesn't exist 問(wèn)題分析,針對(duì)這個(gè)問(wèn)題,這篇文章詳細(xì)介紹了相對(duì)應(yīng)的分析和解答,希望可以幫助更多想解決這個(gè)問(wèn)題的小伙伴找到更簡(jiǎn)單易行的方法。
為晉江等地區(qū)用戶(hù)提供了全套網(wǎng)頁(yè)設(shè)計(jì)制作服務(wù),及晉江網(wǎng)站建設(shè)行業(yè)解決方案。主營(yíng)業(yè)務(wù)為網(wǎng)站設(shè)計(jì)制作、網(wǎng)站設(shè)計(jì)、晉江網(wǎng)站設(shè)計(jì),以傳統(tǒng)方式定制建設(shè)網(wǎng)站,并提供域名空間備案等一條龍服務(wù),秉承以專(zhuān)業(yè)、用心的態(tài)度為用戶(hù)提供真誠(chéng)的服務(wù)。我們深信只要達(dá)到每一位用戶(hù)的要求,就會(huì)得到認(rèn)可,從而選擇與我們長(zhǎng)期合作。這樣,我們也可以走得更遠(yuǎn)!
在搭建 flowable 6.5.1.7 開(kāi)發(fā)環(huán)境的時(shí)候,發(fā)現(xiàn)報(bào) flowable.act_ge_property 無(wú)法找到的錯(cuò)誤
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)
由于在引擎配置類(lèi)已經(jīng)配置了 shcemeUpdate 為 true ,表應(yīng)該自動(dòng)創(chuàng)建
springProcessEngineConfiguration.setDatabaseSchemaUpdate("true");
主要是由于 ProcessDbSchemaManager 類(lèi)的 schemaUpdate 方法
更新的時(shí)候,設(shè)置databaseSchemaUpdate=true的時(shí)候, 代碼邏輯走更新邏輯,使用isEngineTablePresent來(lái)判斷是否存在
isEngineTablePresent 判斷邏輯如下:
public boolean isEngineTablePresent() { return isTablePresent("ACT_RU_EXECUTION"); }
核心代碼 走 jdbc 的 getTables 方法來(lái)進(jìn)行判斷
因?yàn)?mysql數(shù)據(jù)庫(kù)中部署過(guò)Flowable 工程,后面搭建環(huán)境的時(shí)候把表刪除了,所以當(dāng)schema為空時(shí),查找mysql的元數(shù)據(jù)的時(shí)候搜索到了歷史表,但是不在當(dāng)前連接數(shù)據(jù)庫(kù)中,代碼邏輯以為表已經(jīng)有了,其實(shí)還是歷史的表,基本上找到原因了
mysql 8.0 版本驅(qū)動(dòng)將參數(shù) nullCatalogMeansCurrent 的默認(rèn)值由true改為了false,如果使用DatabaseMetaData.getTables獲取所有的表信息,包含了歷史表記錄,導(dǎo)致誤判。
解決方案一
把正常的數(shù)據(jù)庫(kù)的表導(dǎo)出為sql,手動(dòng)創(chuàng)建表。
解決方案二
mysql的連接字符串中添加上nullCatalogMeansCurrent=true,設(shè)置為只查當(dāng)前連接的schema庫(kù)。
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:
關(guān)于如何進(jìn)行flowable工作流引擎Table 'flowable.act_ge_property' doesn't exist 問(wèn)題分析問(wèn)題的解答就分享到這里了,希望以上內(nèi)容可以對(duì)大家有一定的幫助,如果你還有很多疑惑沒(méi)有解開(kāi),可以關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道了解更多相關(guān)知識(shí)。