Error creating bean with name 'liquibase' defined in class path resource.
时间: 2023-11-05 07:01:13 浏览: 280
Spring_ClassPathResource获得bean对象
Error creating bean with name 'liquibase' defined in class path resource [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.LockException: Could not acquire change log lock. Currently locked by crv-api-pull-job-1580587020-hhlqf.
这个错误表示在初始化名为'liquibase'的bean时出现问题。具体地说,在执行init方法时出现了一个lock异常,无法获取change log的锁,因为它当前被crv-api-pull-job-1580587020-hhlqf锁住了。
为了解决这个问题,你可以按照以下步骤进行操作:
1. 运行下面的语句查看哪个机器锁住了database:
USE [Database Name]
SELECT * FROM DATABASECHANGELOGLOCK;
2. 通过下面的sql语句解锁:
UPDATE DATABASECHANGELOGLOCK SET locked=0, lockgranted=null, lockedby=null WHERE id=1。
这样,你应该能够解决'liquibase' bean创建时的问题。
阅读全文