flowable-engine icon indicating copy to clipboard operation
flowable-engine copied to clipboard

Application run failed:Table "ACT_RE_DEPLOYMENT"

Open liuhaoduoduo opened this issue 2 years ago • 14 comments

Describe the bug My service reported an error during startup that a database table could not be found

I am not adding any configuration now, relying entirely on autoconfiguration.

The following information is displayed during startup:

23-07-13 14:16:34.672 INFO 45580 --- [ main] o.f.s.b.e.EventRegistryAutoConfiguration : No deployment resources were found for autodeployment 2023-07-13 14:16:34.699 INFO 45580 --- [ main] o.f.s.SpringProcessEngineConfiguration : Found 2 Engine Configurators in total: 2023-07-13 14:16:34.699 INFO 45580 --- [ main] o.f.s.SpringProcessEngineConfiguration : class org.flowable.eventregistry.spring.configurator.SpringEventRegistryConfigurator (priority:100000) 2023-07-13 14:16:34.699 INFO 45580 --- [ main] o.f.s.SpringProcessEngineConfiguration : class org.flowable.idm.engine.configurator.IdmEngineConfigurator (priority:150000) 2023-07-13 14:16:34.700 INFO 45580 --- [ main] o.f.s.SpringProcessEngineConfiguration : Executing beforeInit() of class org.flowable.eventregistry.spring.configurator.SpringEventRegistryConfigurator (priority:100000) 2023-07-13 14:16:34.707 INFO 45580 --- [ main] o.f.s.SpringProcessEngineConfiguration : Executing beforeInit() of class org.flowable.idm.engine.configurator.IdmEngineConfigurator (priority:150000) 2023-07-13 14:16:35.836 INFO 45580 --- [ main] o.f.s.SpringProcessEngineConfiguration : Executing configure() of class org.flowable.eventregistry.spring.configurator.SpringEventRegistryConfigurator (priority:100000) 2023-07-13 14:16:36.186 INFO 45580 --- [ main] o.f.c.e.impl.db.CommonDbSchemaManager : performing create on common with resource org/flowable/common/db/create/flowable.h2.create.common.sql 2023-07-13 14:16:36.668 INFO 45580 --- [ main] liquibase.lockservice : Successfully acquired change log lock 2023-07-13 14:16:37.458 INFO 45580 --- [ main] liquibase.changelog : Creating database history table with name: PUBLIC.FLW_EV_DATABASECHANGELOG 2023-07-13 14:16:37.461 INFO 45580 --- [ main] liquibase.changelog : Reading from PUBLIC.FLW_EV_DATABASECHANGELOG 2023-07-13 14:16:37.542 INFO 45580 --- [ main] liquibase.changelog : Table FLW_EVENT_DEPLOYMENT created 2023-07-13 14:16:37.543 INFO 45580 --- [ main] liquibase.changelog : Table FLW_EVENT_RESOURCE created 2023-07-13 14:16:37.545 INFO 45580 --- [ main] liquibase.changelog : Table FLW_EVENT_DEFINITION created 2023-07-13 14:16:37.548 INFO 45580 --- [ main] liquibase.changelog : Index ACT_IDX_EVENT_DEF_UNIQ created 2023-07-13 14:16:37.549 INFO 45580 --- [ main] liquibase.changelog : Table FLW_CHANNEL_DEFINITION created 2023-07-13 14:16:37.551 INFO 45580 --- [ main] liquibase.changelog : Index ACT_IDX_CHANNEL_DEF_UNIQ created 2023-07-13 14:16:37.551 INFO 45580 --- [ main] liquibase.changelog : ChangeSet org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml::1::flowable ran successfully in 10ms 2023-07-13 14:16:37.565 INFO 45580 --- [ main] liquibase.changelog : Columns TYPE_(varchar(255)) added to FLW_CHANNEL_DEFINITION 2023-07-13 14:16:37.569 INFO 45580 --- [ main] liquibase.changelog : Columns IMPLEMENTATION_(varchar(255)) added to FLW_CHANNEL_DEFINITION 2023-07-13 14:16:37.569 INFO 45580 --- [ main] liquibase.changelog : ChangeSet org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml::2::flowable ran successfully in 13ms 2023-07-13 14:16:37.623 INFO 45580 --- [ main] liquibase.changelog : Set Channel Definition type and implementation columns 2023-07-13 14:16:37.623 INFO 45580 --- [ main] liquibase.changelog : ChangeSet org/flowable/eventregistry/db/liquibase/flowable-eventregistry-db-changelog.xml::3::flowable ran successfully in 52ms 2023-07-13 14:16:37.625 INFO 45580 --- [ main] liquibase.lockservice : Successfully released change log lock 2023-07-13 14:16:37.625 INFO 45580 --- [ main] o.f.e.impl.EventRegistryEngineImpl : EventRegistryEngine default created 2023-07-13 14:16:37.626 INFO 45580 --- [ main] o.f.s.SpringProcessEngineConfiguration : Executing configure() of class org.flowable.idm.engine.configurator.IdmEngineConfigurator (priority:150000) 2023-07-13 14:16:37.645 INFO 45580 --- [ main] o.f.i.engine.impl.db.IdmDbSchemaManager : performing create on identity with resource org/flowable/idm/db/create/flowable.h2.create.identity.sql 2023-07-13 14:16:37.658 INFO 45580 --- [ main] o.f.idm.engine.impl.IdmEngineImpl : IdmEngine default created 2023-07-13 14:16:37.669 INFO 45580 --- [ main] o.f.c.e.impl.db.CommonDbSchemaManager : performing create on common with resource org/flowable/common/db/create/flowable.h2.create.common.sql 2023-07-13 14:16:37.671 INFO 45580 --- [ main] o.f.i.s.i.d.IdentityLinkDbSchemaManager : performing create on identitylink with resource org/flowable/identitylink/service/db/create/flowable.h2.create.identitylink.sql 2023-07-13 14:16:37.674 INFO 45580 --- [ main] o.f.i.s.i.d.IdentityLinkDbSchemaManager : performing create on identitylink.history with resource org/flowable/identitylink/service/db/create/flowable.h2.create.identitylink.history.sql 2023-07-13 14:16:37.677 INFO 45580 --- [ main] o.f.e.s.i.db.EntityLinkDbSchemaManager : performing create on entitylink with resource org/flowable/entitylink/service/db/create/flowable.h2.create.entitylink.sql 2023-07-13 14:16:37.680 INFO 45580 --- [ main] o.f.e.s.i.db.EntityLinkDbSchemaManager : performing create on entitylink.history with resource org/flowable/entitylink/service/db/create/flowable.h2.create.entitylink.history.sql 2023-07-13 14:16:37.683 INFO 45580 --- [ main] e.s.i.d.EventSubscriptionDbSchemaManager : performing create on eventsubscription with resource org/flowable/eventsubscription/service/db/create/flowable.h2.create.eventsubscription.sql 2023-07-13 14:16:37.685 INFO 45580 --- [ main] o.f.t.s.impl.db.TaskDbSchemaManager : performing create on task with resource org/flowable/task/service/db/create/flowable.h2.create.task.sql 2023-07-13 14:16:37.688 INFO 45580 --- [ main] o.f.t.s.impl.db.TaskDbSchemaManager : performing create on task.history with resource org/flowable/task/service/db/create/flowable.h2.create.task.history.sql 2023-07-13 14:16:37.695 INFO 45580 --- [ main] o.f.v.s.impl.db.VariableDbSchemaManager : performing create on variable with resource org/flowable/variable/service/db/create/flowable.h2.create.variable.sql 2023-07-13 14:16:37.699 INFO 45580 --- [ main] o.f.v.s.impl.db.VariableDbSchemaManager : performing create on variable.history with resource org/flowable/variable/service/db/create/flowable.h2.create.variable.history.sql 2023-07-13 14:16:37.702 INFO 45580 --- [ main] o.f.j.s.impl.db.JobDbSchemaManager : performing create on job with resource org/flowable/job/service/db/create/flowable.h2.create.job.sql 2023-07-13 14:16:37.721 INFO 45580 --- [ main] o.f.b.s.impl.db.BatchDbSchemaManager : performing create on batch with resource org/flowable/batch/service/db/create/flowable.h2.create.batch.sql 2023-07-13 14:16:37.726 INFO 45580 --- [ main] o.f.e.impl.db.ProcessDbSchemaManager : performing create on engine with resource org/flowable/db/create/flowable.h2.create.engine.sql 2023-07-13 14:16:37.767 INFO 45580 --- [ main] o.f.e.impl.db.ProcessDbSchemaManager : performing create on history with resource org/flowable/db/create/flowable.h2.create.history.sql 2023-07-13 14:16:37.777 INFO 45580 --- [ main] o.f.engine.impl.ProcessEngineImpl : ProcessEngine default created 2023-07-13 14:16:37.792 WARN 45580 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'runtimeServiceBean' defined in class path resource [org/flowable/spring/boot/ProcessEngineServicesAutoConfiguration.class]: Unsatisfied dependency expressed through method 'runtimeServiceBean' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.flowable.common.engine.api.FlowableException: Exception during command execution 2023-07-13 14:16:37.894 INFO 45580 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat] 2023-07-13 14:16:37.908 INFO 45580 --- [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled. 2023-07-13 14:16:37.936 ERROR 45580 --- [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'runtimeServiceBean' defined in class path resource [org/flowable/spring/boot/ProcessEngineServicesAutoConfiguration.class]: Unsatisfied dependency expressed through method 'runtimeServiceBean' parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.flowable.common.engine.api.FlowableException: Exception during command execution at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:800) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:541) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1352) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1195) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:582) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:953) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.20.jar:5.3.20] at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.20.jar:5.3.20] at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.5.14.jar:2.5.14] at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:780) [spring-boot-2.5.14.jar:2.5.14] at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:453) [spring-boot-2.5.14.jar:2.5.14] at org.springframework.boot.SpringApplication.run(SpringApplication.java:343) [spring-boot-2.5.14.jar:2.5.14] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1370) [spring-boot-2.5.14.jar:2.5.14] at org.springframework.boot.SpringApplication.run(SpringApplication.java:1359) [spring-boot-2.5.14.jar:2.5.14] at cn.seraph.scan.BzScanApplication.main(BzScanApplication.java:28) [classes/:na] Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'processEngine': FactoryBean threw exception on object creation; nested exception is org.flowable.common.engine.api.FlowableException: Exception during command execution at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:176) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:101) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1884) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1284) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:267) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:276) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.DefaultListableBeanFactory.addCandidateEntry(DefaultListableBeanFactory.java:1614) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.DefaultListableBeanFactory.findAutowireCandidates(DefaultListableBeanFactory.java:1571) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1352) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1309) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:887) ~[spring-beans-5.3.20.jar:5.3.20] at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:791) ~[spring-beans-5.3.20.jar:5.3.20] ... 19 common frames omitted Caused by: org.flowable.common.engine.api.FlowableException: Exception during command execution at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:138) ~[flowable-engine-common-6.8.0.jar:6.8.0] at org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:52) ~[flowable-spring-common-6.8.0.jar:6.8.0] at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) ~[flowable-engine-common-6.8.0.jar:6.8.0] at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56) ~[flowable-engine-common-6.8.0.jar:6.8.0] at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51) ~[flowable-engine-common-6.8.0.jar:6.8.0] at org.flowable.common.engine.impl.query.AbstractQuery.count(AbstractQuery.java:151) ~[flowable-engine-common-6.8.0.jar:6.8.0] at org.flowable.engine.impl.cmd.ValidateV5EntitiesCmd.execute(ValidateV5EntitiesCmd.java:42) ~[flowable-engine-6.8.0.jar:6.8.0] at org.flowable.engine.impl.cmd.ValidateV5EntitiesCmd.execute(ValidateV5EntitiesCmd.java:32) ~[flowable-engine-6.8.0.jar:6.8.0] at org.flowable.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:67) ~[flowable-engine-6.8.0.jar:6.8.0] at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:140) ~[flowable-engine-6.8.0.jar:6.8.0] at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:114) ~[flowable-engine-6.8.0.jar:6.8.0] at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:72) ~[flowable-engine-6.8.0.jar:6.8.0] at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:26) ~[flowable-engine-6.8.0.jar:6.8.0] at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53) ~[flowable-engine-common-6.8.0.jar:6.8.0] at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:105) ~[flowable-engine-common-6.8.0.jar:6.8.0] at org.flowable.common.spring.SpringTransactionInterceptor.lambda$execute$0(SpringTransactionInterceptor.java:57) ~[flowable-spring-common-6.8.0.jar:6.8.0] at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.3.20.jar:5.3.20] at org.flowable.common.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:57) ~[flowable-spring-common-6.8.0.jar:6.8.0] at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30) ~[flowable-engine-common-6.8.0.jar:6.8.0] at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56) ~[flowable-engine-common-6.8.0.jar:6.8.0] at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:51) ~[flowable-engine-common-6.8.0.jar:6.8.0] at org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.postProcessEngineInitialisation(ProcessEngineConfigurationImpl.java:2688) ~[flowable-engine-6.8.0.jar:6.8.0] at org.flowable.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:925) ~[flowable-engine-6.8.0.jar:6.8.0] at org.flowable.spring.SpringProcessEngineConfiguration.buildProcessEngine(SpringProcessEngineConfiguration.java:76) ~[flowable-spring-6.8.0.jar:6.8.0] at org.flowable.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:59) ~[flowable-spring-6.8.0.jar:6.8.0] at org.flowable.spring.ProcessEngineFactoryBean.getObject(ProcessEngineFactoryBean.java:32) ~[flowable-spring-6.8.0.jar:6.8.0] at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169) ~[spring-beans-5.3.20.jar:5.3.20] ... 31 common frames omitted Caused by: org.apache.ibatis.exceptions.PersistenceException:

Error querying database. Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "ACT_RE_DEPLOYMENT" not found (this database is empty); SQL statement:

select count(RES.ID_)

from ACT_RE_DEPLOYMENT RES
 WHERE  RES.ENGINE_VERSION_ = ? [42104-220]

The error may exist in org/flowable/db/mapping/entity/Deployment.xml

The error may involve org.flowable.engine.impl.persistence.entity.DeploymentEntityImpl.selectDeploymentCountByQueryCriteria

The error occurred while executing a query

SQL: select count(RES.ID_) from ACT_RE_DEPLOYMENT RES WHERE RES.ENGINE_VERSION_ = ?

Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "ACT_RE_DEPLOYMENT" not found (this database is empty); SQL statement:

select count(RES.ID_)

from ACT_RE_DEPLOYMENT RES
 WHERE  RES.ENGINE_VERSION_ = ? [42104-220]
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:153) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:145) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:140) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:76) ~[mybatis-3.5.10.jar:3.5.10]
at org.flowable.common.engine.impl.db.DbSqlSession.selectOne(DbSqlSession.java:286) ~[flowable-engine-common-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.persistence.entity.data.impl.MybatisDeploymentDataManager.findDeploymentCountByQueryCriteria(MybatisDeploymentDataManager.java:47) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.persistence.entity.DeploymentEntityManagerImpl.findDeploymentCountByQueryCriteria(DeploymentEntityManagerImpl.java:334) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.DeploymentQueryImpl.executeCount(DeploymentQueryImpl.java:258) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.common.engine.impl.query.AbstractQuery.execute(AbstractQuery.java:168) ~[flowable-engine-common-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.interceptor.CommandInvoker$1.run(CommandInvoker.java:67) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperation(CommandInvoker.java:140) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.executeOperations(CommandInvoker.java:114) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.interceptor.CommandInvoker.execute(CommandInvoker.java:72) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.engine.impl.interceptor.BpmnOverrideContextInterceptor.execute(BpmnOverrideContextInterceptor.java:26) ~[flowable-engine-6.8.0.jar:6.8.0]
at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53) ~[flowable-engine-common-6.8.0.jar:6.8.0]
at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:105) ~[flowable-engine-common-6.8.0.jar:6.8.0]
... 57 common frames omitted

Caused by: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "ACT_RE_DEPLOYMENT" not found (this database is empty); SQL statement: select count(RES.ID_)

from ACT_RE_DEPLOYMENT RES
 WHERE  RES.ENGINE_VERSION_ = ? [42104-220]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:514) ~[h2-2.2.220.jar:2.2.220]
at org.h2.message.DbException.getJdbcSQLException(DbException.java:489) ~[h2-2.2.220.jar:2.2.220]
at org.h2.message.DbException.get(DbException.java:223) ~[h2-2.2.220.jar:2.2.220]
at org.h2.message.DbException.get(DbException.java:199) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.getTableOrViewNotFoundDbException(Parser.java:8548) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.getTableOrViewNotFoundDbException(Parser.java:8532) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.readTableOrView(Parser.java:8521) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.readTablePrimary(Parser.java:1911) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.readTableReference(Parser.java:2391) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.parseSelectFromPart(Parser.java:2844) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.parseSelect(Parser.java:2950) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.parseQueryPrimary(Parser.java:2834) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.parseQueryTerm(Parser.java:2690) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.parseQueryExpressionBody(Parser.java:2669) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.parseQueryExpressionBodyAndEndOfQuery(Parser.java:2662) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.parseQueryExpression(Parser.java:2655) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.parseQuery(Parser.java:2624) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.parsePrepared(Parser.java:732) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.parse(Parser.java:697) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.parse(Parser.java:669) ~[h2-2.2.220.jar:2.2.220]
at org.h2.command.Parser.prepareCommand(Parser.java:577) ~[h2-2.2.220.jar:2.2.220]
at org.h2.engine.SessionLocal.prepareLocal(SessionLocal.java:634) ~[h2-2.2.220.jar:2.2.220]
at org.h2.engine.SessionLocal.prepareCommand(SessionLocal.java:557) ~[h2-2.2.220.jar:2.2.220]
at org.h2.jdbc.JdbcConnection.prepareCommand(JdbcConnection.java:1116) ~[h2-2.2.220.jar:2.2.220]
at org.h2.jdbc.JdbcPreparedStatement.<init>(JdbcPreparedStatement.java:92) ~[h2-2.2.220.jar:2.2.220]
at org.h2.jdbc.JdbcConnection.prepareStatement(JdbcConnection.java:288) ~[h2-2.2.220.jar:2.2.220]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_372]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_372]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_372]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_372]
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invoke(TransactionAwareDataSourceProxy.java:238) ~[spring-jdbc-5.3.20.jar:5.3.20]
at com.sun.proxy.$Proxy346.prepareStatement(Unknown Source) ~[na:na]
at org.apache.ibatis.executor.statement.PreparedStatementHandler.instantiateStatement(PreparedStatementHandler.java:86) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.executor.statement.BaseStatementHandler.prepare(BaseStatementHandler.java:88) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.executor.statement.RoutingStatementHandler.prepare(RoutingStatementHandler.java:59) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.executor.SimpleExecutor.prepareStatement(SimpleExecutor.java:87) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:62) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:325) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:156) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:109) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:89) ~[mybatis-3.5.10.jar:3.5.10]
at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:151) ~[mybatis-3.5.10.jar:3.5.10]
... 72 common frames omitted

Process finished with exit code 1

Expected behavior My expectation is that no errors are reported and the service starts normally

Code If applicable, add the code that you are using when having the issue.

Additional context SpringBoot:2.5.14 flowable-spring-boot-starter-process:6.8.0 database:h2:2.2.220

liuhaoduoduo avatar Jul 13 '23 09:07 liuhaoduoduo

Could you please not close issues every time, I am more than willing to provide more detailed information, but it is not friendly for me to reproduce the creation after every close

liuhaoduoduo avatar Jul 13 '23 09:07 liuhaoduoduo

Can you share the app you are having this issue with so we can reproduce it? I was closing the issue because you were not sharing the logging related to the issue and we have to keep our issue list clean.

tijsrademakers avatar Jul 13 '23 09:07 tijsrademakers

I'm sorry, I can't give you the source code of my project. You can let me know if you need more from me.

liuhaoduoduo avatar Jul 13 '23 10:07 liuhaoduoduo

We need to be able to understand how your project is setup, because we never got this feedback that this doesn't work. Which Flowable dependencies are you using in your project? Did you configure multiple data sources? etc etc

tijsrademakers avatar Jul 13 '23 10:07 tijsrademakers

Now the project that can reproduce the problem contains a lot of other business code of the company, which is really inconvenient to provide. However, I am planning to reconstruct a Demo project to try to reproduce this problem, and the new Demo does not contain other business codes of the company。

The dependencies currently in use are: <groupId>org.flowable</groupId> <artifactId>flowable-spring-boot-starter-process</artifactId> 6.8.0

There are multiple data sources in the project, and the H2 database is used preferentially through the @Primary annotation provided by Spring Another data source is ClickHouse。

liuhaoduoduo avatar Jul 13 '23 13:07 liuhaoduoduo

The demo project can be reproduced problem https://github.com/liuhaoduoduo/flowable-demo

liuhaoduoduo avatar Jul 14 '23 06:07 liuhaoduoduo

I use MySQL. After testing, if there are Flowable-related tables in other schemas, and your new data source is linked to another schema, an error will occur. @tijsrademakers @liuhaoduoduo

timeroar avatar Jul 14 '23 11:07 timeroar

@timeroar , this sounds like a non Flowable error, more a matter of how the application is configured with 2 different data sources, or do you believe there is a Flowable issue?

tijsrademakers avatar Jul 28 '23 06:07 tijsrademakers

@tijsrademakers Multiple data sources are definitely not available at this time, right? Are there any plans to support it with an update in the near future?

clnliuhao avatar Jul 29 '23 13:07 clnliuhao

I have two completely different projects, but they both use the same MySQL database. These two projects use different schemas as data source links. Both of these projects use Flowable. The first project starts without any problems and successfully creates tables. However, the second project throws an error when starting up. If I clear the tables created by Flowable in the first project and start the second project first, then the second project will start successfully, but the first project will fail to start. @tijsrademakers

timeroar avatar Aug 07 '23 02:08 timeroar

When using the same MySQL database with 2 different schema's we strongly recommend to use different database user per schema. So make sure the first project uses a different database user than the second project, that should work fine.

tijsrademakers avatar Aug 07 '23 19:08 tijsrademakers

@tijsrademakers Any progress on multiple data sources for a project (clickhouse+h2)?

clnliuhao avatar Dec 12 '23 08:12 clnliuhao

if you can explain what Flowable can do to support this, then we can look into it. But at the moment I don't see yet what needs to be changed in Flowable.

tijsrademakers avatar Dec 12 '23 08:12 tijsrademakers

我不知道怎么做能使Flowable支持两个数据源,但是我可以描述一下的业务场景。 我的业务场景是工作流将会定义在单独的文件里,例如xml文件中。需要应用每次启动的时候去加载它即可,不需要持久化存储到数据库中。我的其他业务数据是存储在clickhouse中,不希望经过Flowable解析的数据也存储到这个库中。

I don't know how to make Flowable support two data sources, but I can describe the business scenario here. My business scenario is that the workflow will be defined in a separate file, such as an xml file. It needs to be loaded every time the application is started, and does not need to be persisted to the database. The rest of my business data is stored in clickhouse, and I don't want the data that Flowable parses to be in this library as well.

clnliuhao avatar Dec 14 '23 02:12 clnliuhao