org.springframework.beans.factory.BeanCreationException: 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: liquibase.exception.DatabaseException: Expected single row from liquibase.statement.core.SelectFromDatabaseChangeLogLockStatement@406a406c but got 0

JIRA | Michael Rumpf | 5 months ago
  1. 0

    When Liquibase prints the message {code} 2016-07-19 09:08:27,861 [ INFO] [main] () {} (liquibase): Waiting for changelog lock.... 2016-07-19 09:08:37,865 [ INFO] [main] () {} (liquibase): Waiting for changelog lock.... 2016-07-19 09:08:47,868 [ INFO] [main] () {} (liquibase): Waiting for changelog lock.... 2016-07-19 09:08:57,872 [ INFO] [main] () {} (liquibase): Waiting for changelog lock.... {code} and someone deletes the lock entry in the databasechangeloglock table, Liquibase fails with an error: {code} 2016-07-19 09:08:47,868 [ INFO] [main] () {} (liquibase): Waiting for changelog lock.... 2016-07-19 09:08:57,872 [ INFO] [main] () {} (liquibase): Waiting for changelog lock.... 2016-07-19 09:09:07,876 [ WARN] [main] () {} (AnnotationConfigEmbeddedWebApplicationContext): Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: 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: liquibase.exception.DatabaseException: Expected single row from liquibase.statement.core.SelectFromDatabaseChangeLogLockStatement@406a406c but got 0 2016-07-19 09:09:07,906 [ERROR] [main] () {} (SpringApplication): Application startup failed org.springframework.beans.factory.BeanCreationException: 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: liquibase.exception.DatabaseException: Expected single row from liquibase.statement.core.SelectFromDatabaseChangeLogLockStatement@406a406c but got 0 at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:296) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197) at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1054) at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:829) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538) at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766) at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361) at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) at com.daimler.daivb.core.InitExecApplication.run(InitExecApplication.java:36) at com.daimler.daivb.core.DaivbSpringApplication.run(DaivbSpringApplication.java:50) at com.daimler.daivb.core.DaivbSpringApplication.run(DaivbSpringApplication.java:29) at com.daimler.daivb.vhp.VhpApplication.main(VhpApplication.java:72) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54) at java.lang.Thread.run(Thread.java:745) Caused by: liquibase.exception.LockException: liquibase.exception.DatabaseException: Expected single row from liquibase.statement.core.SelectFromDatabaseChangeLogLockStatement@406a406c but got 0 at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:225) at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:164) at liquibase.Liquibase.update(Liquibase.java:196) at liquibase.Liquibase.update(Liquibase.java:192) at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:434) at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:391) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574) ... 25 more Caused by: liquibase.exception.DatabaseException: Expected single row from liquibase.statement.core.SelectFromDatabaseChangeLogLockStatement@406a406c but got 0 at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:140) at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:151) at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:146) at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:200) ... 32 more Caused by: liquibase.exception.DatabaseException: Empty result set, expected one row at liquibase.util.JdbcUtils.requiredSingleResult(JdbcUtils.java:141) at liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:138) ... 35 more {code}

    JIRA | 5 months ago | Michael Rumpf
    org.springframework.beans.factory.BeanCreationException: 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: liquibase.exception.DatabaseException: Expected single row from liquibase.statement.core.SelectFromDatabaseChangeLogLockStatement@406a406c but got 0
  2. 0

    spring liquibase / hsqldb integration

    Stack Overflow | 2 years ago | JayabalanAaron
    liquibase.exception.LockException: liquibase.exception.UnexpectedLiquibaseException: liquibase.snapshot.InvalidExampleException: Found multiple catalog/schemas matching null.PUBLIC
  3. 0

    On ubuntu spring-boot fails

    GitHub | 1 year ago | pulkitnandan
    org.springframework.context.ApplicationContextException: Unable to start embedded container; nested exception is org.springframework.boot.context.embedded.EmbeddedServletContainerException: Unable to start embedded Tomcat
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    latest image does not work

    GitHub | 1 year ago | gregory
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase-core' defined in URL [jar:file:/usr/share/cattle/b654598daad9f2d5479f67f96ddc2431/WEB-INF/lib/cattle-framework-db-loader-0.5.0-SNAPSHOT.jar!/META-INF/cattle/system/spring-db-loader-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.LockException: Could not acquire change log lock. Currently locked by 881eb5d4360e (fe80:0:0:0:42:acff:fe11:17%54) since 10/12/15 4:52 AM
  6. 0

    Upgrade from server v0.59.1 to v0.63.0 fails

    GitHub | 9 months ago | jmreicha
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase-core' defined in URL [jar:file:/usr/share/cattle/cb6bab72d3fdd8af16f1c72bb3366250/WEB-INF/lib/cattle-app-config-0.5.0-SNAPSHOT.jar!/META-INF/cattle/system/spring-system-context.xml]: Invocation of init method failed; nested exception is liquibase.exception.LockException: Could not acquire change log lock. Currently locked by fb256133d901 (fe80:0:0:0:42:acff:fe11:2%26) since 3/14/16 6:25 PM

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. liquibase.exception.DatabaseException

      Empty result set, expected one row

      at liquibase.util.JdbcUtils.requiredSingleResult()
    2. Liquibase Core
      SpringLiquibase.afterPropertiesSet
      1. liquibase.util.JdbcUtils.requiredSingleResult(JdbcUtils.java:141)
      2. liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:138)
      3. liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:151)
      4. liquibase.executor.jvm.JdbcExecutor.queryForObject(JdbcExecutor.java:146)
      5. liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:200)
      6. liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:164)
      7. liquibase.Liquibase.update(Liquibase.java:196)
      8. liquibase.Liquibase.update(Liquibase.java:192)
      9. liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:434)
      10. liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:391)
      10 frames
    3. Spring Beans
      AbstractBeanFactory.getBean
      1. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
      2. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1574)
      3. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
      4. org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
      5. org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
      6. org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
      7. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
      8. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      9. org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:296)
      10. org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
      10 frames
    4. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1054)
      2. org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:829)
      3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:538)
      3 frames
    5. Spring Boot
      SpringApplication.run
      1. org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
      2. org.springframework.boot.SpringApplication.refresh(SpringApplication.java:766)
      3. org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:361)
      4. org.springframework.boot.SpringApplication.run(SpringApplication.java:307)
      4 frames
    6. com.daimler.daivb
      VhpApplication.main
      1. com.daimler.daivb.core.InitExecApplication.run(InitExecApplication.java:36)
      2. com.daimler.daivb.core.DaivbSpringApplication.run(DaivbSpringApplication.java:50)
      3. com.daimler.daivb.core.DaivbSpringApplication.run(DaivbSpringApplication.java:29)
      4. com.daimler.daivb.vhp.VhpApplication.main(VhpApplication.java:72)
      4 frames
    7. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      4. java.lang.reflect.Method.invoke(Method.java:497)
      4 frames
    8. Spring Boot Loader
      MainMethodRunner.run
      1. org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:54)
      1 frame
    9. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:745)
      1 frame