Could not acquire change log lock. Currently locked by XXXXXX

          最近公司项目使用到了flowable,为了方便业务开发人员使用流程设计器画流程图,使用了flowable的原生流程设计器modeler。用docker部署非常方便,参考flowable流程设计器部署官网文档。

用docker部署flowable的流程设计器时,flowable-task.war启动报错信息如下:

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'flowableAppEngine': FactoryBean threw exception on object creation; nested exception is org.flowable.common.engine.api.FlowableException: Error initialising cmmn data model
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:178)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:101)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1654)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1174)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:327)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)
	at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:251)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1135)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1062)
	at org.springframework.beans.factory.support.ConstructorResolver.resolveAutowiredArgument(ConstructorResolver.java:819)
	at org.springframework.beans.factory.support.ConstructorResolver.createArgumentArray(ConstructorResolver.java:725)
	... 77 more
Caused by: org.flowable.common.engine.api.FlowableException: Error initialising cmmn data model
	at org.flowable.cmmn.engine.impl.db.CmmnDbSchemaManager.initSchema(CmmnDbSchemaManager.java:68)
	at org.flowable.cmmn.engine.impl.db.CmmnDbSchemaManager.initSchema(CmmnDbSchemaManager.java:47)
	at org.flowable.cmmn.engine.impl.db.CmmnDbSchemaManager.initSchema(CmmnDbSchemaManager.java:43)
	at org.flowable.cmmn.engine.impl.cmd.SchemaOperationsCmmnEngineBuild.execute(SchemaOperationsCmmnEngineBuild.java:27)
	at org.flowable.cmmn.engine.impl.cmd.SchemaOperationsCmmnEngineBuild.execute(SchemaOperationsCmmnEngineBuild.java:23)
	at org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker$1.run(CmmnCommandInvoker.java:46)
	at org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker.executeOperations(CmmnCommandInvoker.java:70)
	at org.flowable.cmmn.engine.impl.interceptor.CmmnCommandInvoker.execute(CmmnCommandInvoker.java:49)
	at org.flowable.common.engine.impl.interceptor.TransactionContextInterceptor.execute(TransactionContextInterceptor.java:53)
	at org.flowable.common.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:71)
	at org.flowable.cmmn.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:49)
	at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140)
	at org.flowable.cmmn.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:46)
	at org.flowable.common.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:30)
	at org.flowable.common.engine.impl.cfg.CommandExecutorImpl.execute(CommandExecutorImpl.java:56)
	at org.flowable.cmmn.engine.impl.CmmnEngineImpl.(CmmnEngineImpl.java:60)
	at org.flowable.cmmn.engine.CmmnEngineConfiguration.buildCmmnEngine(CmmnEngineConfiguration.java:728)
	at org.flowable.cmmn.spring.SpringCmmnEngineConfiguration.buildCmmnEngine(SpringCmmnEngineConfiguration.java:66)
	at org.flowable.cmmn.spring.configurator.SpringCmmnEngineConfigurator.initCmmnEngine(SpringCmmnEngineConfigurator.java:74)
	at org.flowable.cmmn.spring.configurator.SpringCmmnEngineConfigurator.configure(SpringCmmnEngineConfigurator.java:63)
	at org.flowable.common.engine.impl.AbstractEngineConfiguration.configuratorsAfterInit(AbstractEngineConfiguration.java:887)
	at org.flowable.app.engine.AppEngineConfiguration.init(AppEngineConfiguration.java:222)
	at org.flowable.app.engine.AppEngineConfiguration.buildAppEngine(AppEngineConfiguration.java:180)
	at org.flowable.app.spring.SpringAppEngineConfiguration.buildAppEngine(SpringAppEngineConfiguration.java:61)
	at org.flowable.app.spring.AppEngineFactoryBean.getObject(AppEngineFactoryBean.java:59)
	at org.flowable.app.spring.AppEngineFactoryBean.getObject(AppEngineFactoryBean.java:31)
	at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:171)
	... 87 more
Caused by: org.flowable.common.engine.api.FlowableException: Error updating CMMN engine tables
	at org.flowable.cmmn.engine.impl.db.CmmnDbSchemaManager.schemaUpdate(CmmnDbSchemaManager.java:208)
	at org.flowable.cmmn.engine.impl.db.CmmnDbSchemaManager.initSchema(CmmnDbSchemaManager.java:61)
	... 113 more
Caused by: liquibase.exception.LockException: Could not acquire change log lock.  Currently locked by 2a88c565e1d8 (172.17.0.2) since 5/2/20 3:37 AM
	at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:230)
	at liquibase.Liquibase.update(Liquibase.java:184)
	at liquibase.Liquibase.update(Liquibase.java:179)
	at liquibase.Liquibase.update(Liquibase.java:175)
	at liquibase.Liquibase.update(Liquibase.java:168)
	at org.flowable.cmmn.engine.impl.db.CmmnDbSchemaManager.schemaUpdate(CmmnDbSchemaManager.java:205)
	... 114 more

06-May-2020 01:50:27.817 SEVERE [localhost-startStop-1] org.apache.catalina.startup.HostConfig.deployWAR Error deploying web application archive [/opt/tomcat/webapps/flowable-task.war]
 java.lang.IllegalStateException: ContainerBase.addChild: start: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Catalina].StandardHost[localhost].StandardContext[/flowable-task]]
	at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:758)
	at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:730)
	at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:734)
	at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:985)
	at org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1857)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

我使用的是6.4.1的版本,启动报错信息主要有两点:

1. Error updating CMMN engine tables

2.Could not acquire change log lock.  Currently locked by XXXXX

Could not acquire change log lock. Currently locked by XXXXXX_第1张图片

 

查看到带“COMMN”的CHANGELOGLOCK的表只有一个,打开如下

Could not acquire change log lock. Currently locked by XXXXXX_第2张图片

 

顺便看下其它带CHANGELOGLOCK的表,都是0。那么只要把LOCKED值改为0就OK了。

 

说明一下ACT_DMN表的作用。

Flowable DMN的所有数据库表都以ACT_DMN_开头。

  • ACT_DMN_DATABASECHANGELOG: 由Liquibase使用,用于追踪表结构修改。

  • ACT_DMN_DATABASECHANGELOGLOCK: 由Liquibase使用,用于确保同时只有一个运行的Liquibase实例。

  • ACT_DMN_DECISION_TABLE: 保存已部署的选择表的元数据。

  • ACT_DMN_DEPLOYMENT: 保存部署的元数据。

  • ACT_DMN_DEPLOYMENT_RESOURCE: 保存DMN定义的资源和元数据。

 

你可能感兴趣的:(flowable,Java,java)