liquibase.exception.UnexpectedLiquibaseException: java.io.IOException: Unable to read file '....sql'

JIRA | Dmitry Gil | 2 years ago
  1. 0

    C:\liquibase-3.2.0-bin>liquibase --defaultsFile test.properties --changeLogFile=db.changelog.xml generateChangeLog Liquibase 'generateChangeLog' Successful C:\liquibase-3.2.0-bin>liquibase --defaultsFile test.properties --changeLogFile=db.changelog.sql generateChangeLog DEBUG 16-06-14 07:54 PM: liquibase: Connected to sa@jdbc:sqlserver://MSI\sqlexpress:64921;authenticationScheme=nativeAuthentication;xopenStates=false;sendTimeAsDatetime=true;trustServerCertificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;multiSubnetFailover=false;loginTimeout=15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;databaseName=ppro-vspt;applicationName=Microsoft JDBC Driver for SQL Server;applicationIntent=readwrite; DEBUG 16-06-14 07:54 PM: liquibase: Setting auto commit to false from true DEBUG 16-06-14 07:54 PM: liquibase: Executing QUERY database command: select schema_name() DEBUG 16-06-14 07:54 PM: liquibase: Computed checksum for 1402962840822 as 263652e6a2223240ac05c752b0f6a0f3 DEBUG 16-06-14 07:54 PM: liquibase: Executing QUERY database command: SELECT CONVERT(varchar(100), SERVERPROPERTY('COLLATION')) INFO 16-06-14 07:54 PM: liquibase: db.changelog.sql does not exist, creating DEBUG 16-06-14 07:54 PM: liquibase: MissingObjectChangeGenerator type order: liquibase.structure.core.Catalog liquibase.structure.core.Schema liquibase.structure.core.Sequence liquibase.structure.core.StoredProcedure liquibase.structure.core.Table liquibase.structure.core.Column liquibase.structure.core.PrimaryKey liquibase.structure.core.UniqueConstraint liquibase.structure.core.ForeignKey liquibase.structure.core.Index liquibase.structure.core.View DEBUG 16-06-14 07:54 PM: liquibase: UnexpectedObjectChangeGenerator type order: liquibase.structure.core.Catalog liquibase.structure.core.ForeignKey liquibase.structure.core.Schema liquibase.structure.core.StoredProcedure liquibase.structure.core.UniqueConstraint liquibase.structure.core.View liquibase.structure.core.Table liquibase.structure.core.PrimaryKey liquibase.structure.core.Column liquibase.structure.core.Index liquibase.structure.core.Sequence DEBUG 16-06-14 07:54 PM: liquibase: ChangedObjectChangeGenerator type order: liquibase.structure.core.Catalog liquibase.structure.core.ForeignKey liquibase.structure.core.Schema liquibase.structure.core.Sequence liquibase.structure.core.StoredProcedure liquibase.structure.core.Table liquibase.structure.core.Column liquibase.structure.core.PrimaryKey liquibase.structure.core.Index liquibase.structure.core.UniqueConstraint liquibase.structure.core.View Unexpected error running Liquibase: liquibase.exception.UnexpectedLiquibaseException: No changeset file path set. Cannot determine target database type SEVERE 16-06-14 07:54 PM: liquibase: liquibase.exception.UnexpectedLiquibaseException: No changeset file path set. Cannot determine target database type liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: No changeset file path set. Cannot determine target database type at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:139) at liquibase.integration.commandline.Main.doMigration(Main.java:899) at liquibase.integration.commandline.Main.run(Main.java:170) at liquibase.integration.commandline.Main.main(Main.java:89) Caused by: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: No changeset file path set. Cannot determine target database type at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13) at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:137) ... 3 more Caused by: liquibase.exception.UnexpectedLiquibaseException: No changeset file path set. Cannot determine target database type at liquibase.serializer.core.formattedsql.FormattedSqlChangeLogSerializer.getTargetDatabase(FormattedSqlChangeLogSerializer.java:64) at liquibase.serializer.core.formattedsql.FormattedSqlChangeLogSerializer.serialize(FormattedSqlChangeLogSerializer.java:40) at liquibase.serializer.core.formattedsql.FormattedSqlChangeLogSerializer.write(FormattedSqlChangeLogSerializer.java:87) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:129) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:73) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:61) at liquibase.command.GenerateChangeLogCommand.run(GenerateChangeLogCommand.java:54) at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8) ... 4 more

    JIRA | 2 years ago | Ricardo Stuven
    liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: liquibase.exception.UnexpectedLiquibaseException: No changeset file path set. Cannot determine target database type
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

  3. 0

    When you use SpringLiquibase with dropFirst=true you get an error when the update is applied because the lock table has been dropped (I think): {noformat} INFO: Creating embedded database 'liquibasetest' INFO 27/10/14 14:11: liquibase: Successfully acquired change log lock INFO 27/10/14 14:11: liquibase: Dropping Database Objects in schema: PUBLIC.PUBLIC INFO 27/10/14 14:11: liquibase: Creating database history table with name: PUBLIC.DATABASECHANGELOG INFO 27/10/14 14:11: liquibase: Successfully released change log lock Oct 27, 2014 2:11:43 PM org.springframework.context.support.AbstractApplicationContext refresh WARNING: Exception encountered during context initialization - cancelling refresh attempt ... aused by: liquibase.exception.LockException: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:214) at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:153) at liquibase.Liquibase.update(Liquibase.java:182) at liquibase.Liquibase.update(Liquibase.java:174) at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:345) at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:302) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1627) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1564) ... 37 more Caused by: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK at liquibase.lockservice.StandardLockService.isDatabaseChangeLogLockTableInitialized(StandardLockService.java:121) at liquibase.lockservice.StandardLockService.init(StandardLockService.java:95) at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:187) ... 44 more ... {noformat}

    JIRA | 2 years ago | Dave Syer
    liquibase.exception.LockException: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK
  4. 0

    When you use SpringLiquibase with dropFirst=true you get an error when the update is applied because the lock table has been dropped (I think): {noformat} INFO: Creating embedded database 'liquibasetest' INFO 27/10/14 14:11: liquibase: Successfully acquired change log lock INFO 27/10/14 14:11: liquibase: Dropping Database Objects in schema: PUBLIC.PUBLIC INFO 27/10/14 14:11: liquibase: Creating database history table with name: PUBLIC.DATABASECHANGELOG INFO 27/10/14 14:11: liquibase: Successfully released change log lock Oct 27, 2014 2:11:43 PM org.springframework.context.support.AbstractApplicationContext refresh WARNING: Exception encountered during context initialization - cancelling refresh attempt ... aused by: liquibase.exception.LockException: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:214) at liquibase.lockservice.StandardLockService.waitForLock(StandardLockService.java:153) at liquibase.Liquibase.update(Liquibase.java:182) at liquibase.Liquibase.update(Liquibase.java:174) at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:345) at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:302) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1627) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1564) ... 37 more Caused by: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK at liquibase.lockservice.StandardLockService.isDatabaseChangeLogLockTableInitialized(StandardLockService.java:121) at liquibase.lockservice.StandardLockService.init(StandardLockService.java:95) at liquibase.lockservice.StandardLockService.acquireLock(StandardLockService.java:187) ... 44 more ... {noformat}

    JIRA | 2 years ago | Dave Syer
    liquibase.exception.LockException: liquibase.exception.UnexpectedLiquibaseException: liquibase.exception.DatabaseException: Error executing SQL select count(*) from PUBLIC.DATABASECHANGELOGLOCK: user lacks privilege or object not found: DATABASECHANGELOGLOCK

    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.UnexpectedLiquibaseException

      java.io.IOException: Unable to read file '....sql'

      at liquibase.change.AbstractSQLChange.generateCheckSum()
    2. Liquibase Core
      ChangeSet.generateCheckSum
      1. liquibase.change.AbstractSQLChange.generateCheckSum(AbstractSQLChange.java:177)
      2. liquibase.changelog.ChangeSet.generateCheckSum(ChangeSet.java:237)
      2 frames