liquibase.exception.MigrationFailedException: Migration failed for change set latest/vw/departments_vw.xml::1::jsmith: Reason: update.xml : Error getting jdbc:hsqldb:hsql://localhost/testdb view with liquibase.statement.core.GetViewDefinitionStatement@a00185 : Caused By: Precondition Error

JIRA | Nathan Voxland | 7 years ago
  1. 0

    From http://liquibase.org/forum/index.php?topic=221.0 Hello, I would like to signal a kind of "exception swallowing". I was testing LiquiBase Version: 2.0-rc2-SNAPSHOT against a test HSQL database whith the last snaphot jar of HSQLDB 1.9 released on 1 Nov (after RC6). I was running the command "liquibase --logLevel=debug --changeLogFile=update.xml update" whith my changelongs including this xml: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd"> <changeSet author="jsmith" id="1" runOnChange="true"> <preConditions onFail="MARK_RAN"> <viewExists viewName="departments_vw"/> </preConditions> <dropView viewName="departments_vw"/> </changeSet> <changeSet author="jsmith" id="2" runOnChange="true"> <createView viewName="departments_vw"> select id, dname from departments </createView> </changeSet> </databaseChangeLog> and I had this error: INFO 12/11/09 22.55:liquibase: Reading from DATABASECHANGELOG DEBUG 12/11/09 22.55:liquibase: Running Changeset:latest/vw/departments_vw.xml::1::jsmith::(Checksum: 2:d47fa6915fc3c813b6a0b666cdcb2601) DEBUG 12/11/09 22.55:liquibase: Changeset latest/vw/departments_vw.xml::1::jsmith::(Checksum: 2:d47fa6915fc3c813b6a0b666cdcb2601) DEBUG 12/11/09 22.55:liquibase: Release Database Lock INFO 12/11/09 22.55:liquibase: Successfully released change log lock LiquiBase Update Failed: Precondition Error INFO 12/11/09 22.55:liquibase: Precondition Error liquibase.exception.MigrationFailedException: Migration failed for change set latest/vw/departments_vw.xml::1::jsmith: Reason: update.xml : Error getting jdbc:hsqldb:hsql://localhost/testdb view with liquibase.statement.core.GetViewDefinitionStatement@a00185 : Caused By: Precondition Error at liquibase.changelog.ChangeSet.execute(ChangeSet.java:197) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:26) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:39) at liquibase.Liquibase.update(Liquibase.java:103) at liquibase.integration.commandline.Main.doMigration(Main.java:664) at liquibase.integration.commandline.Main.main(Main.java:105) Caused by: liquibase.exception.PreconditionErrorException: Precondition Error at liquibase.precondition.core.ViewExistsPrecondition.check(ViewExistsPrecondition.java:39) at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:24) at liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:199) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:163) ... 5 more Now, the problem it's not the error by itself, but the fact that I had no way to understand the real cause of the error! I debugged the application and here's what I discovered: the original DatabaseException is caught in class HsqlDatabaseSnapshotGenerator(JdbcDatabaseSnapshotGenerator).readView(ResultSet, Database) line: 146: in this fragment of code: try { view.setDefinition(database.getViewDefinition(rs.getString("TABLE_SCHEM"), name)); } catch (DatabaseException e) { throw new DatabaseException("Error getting " + database.getConnection().getURL() + " view with " + new GetViewDefinitionStatement(view.getSchema(), name), e); } and is generated in this fragment of code (in JdbcExecutor.execute(StatementCallback, List<SqlVisitor>) line: 58) public Object execute(StatementCallback action, List<SqlVisitor> sqlVisitors) throws DatabaseException { DatabaseConnection con = database.getConnection(); Statement stmt = null; try { stmt = ((JdbcConnection) con).getUnderlyingConnection().createStatement(); Statement stmtToUse = stmt; return action.doInStatement(stmtToUse); } catch (SQLException ex) { // Release Connection early, to avoid potential connection pool deadlock // in the case when the exception translator hasn't been initialized yet. JdbcUtils.closeStatement(stmt); stmt = null; throw new DatabaseException("Error executing SQL " + StringUtils.join(applyVisitors(action.getStatement(), sqlVisitors), ", "), ex); } finally { JdbcUtils.closeStatement(stmt); } } reached with the following stack: JdbcExecutor.execute(StatementCallback, List<SqlVisitor>) line: 58 JdbcExecutor.query(SqlStatement, ResultSetExtractor, List<SqlVisitor>) line: 124 JdbcExecutor.query(SqlStatement, RowMapper, List<SqlVisitor>) line: 132 JdbcExecutor.queryForObject(SqlStatement, RowMapper, List<SqlVisitor>) line: 140 JdbcExecutor.queryForObject(SqlStatement, Class, List<SqlVisitor>) line: 149 JdbcExecutor.queryForObject(SqlStatement, Class) line: 145 HsqlDatabase(AbstractDatabase).getViewDefinition(String, String) line: 608 HsqlDatabaseSnapshotGenerator(JdbcDatabaseSnapshotGenerator).readView(ResultSet, Database) line: 146 HsqlDatabaseSnapshotGenerator(JdbcDatabaseSnapshotGenerator).readViews(DatabaseSnapshot, String, DatabaseMetaData) line: 263 HsqlDatabaseSnapshotGenerator(JdbcDatabaseSnapshotGenerator).createSnapshot(Database, String, Set<DiffStatusListener>) line: 203 DatabaseSnapshotGeneratorFactory.createSnapshot(Database, String, Set<DiffStatusListener>) line: 69 ViewExistsPrecondition.check(Database, DatabaseChangeLog, ChangeSet) line: 37 PreconditionContainer(AndPrecondition).check(Database, DatabaseChangeLog, ChangeSet) line: 24 PreconditionContainer.check(Database, DatabaseChangeLog, ChangeSet) line: 199 ChangeSet.execute(DatabaseChangeLog, Database) line: 163 UpdateVisitor.visit(ChangeSet, DatabaseChangeLog, Database) line: 26 ChangeLogIterator.run(ChangeSetVisitor, Database) line: 39 Liquibase.update(String) line: 103 Main.doMigration() line: 664 Main.main(String[]) line: 105 The variable ex in the code above contains the real problem: java.sql.SQLException: user lacks privilege or object not found: SYSTEM_VIEWS and the message of the DatabaseException being thrown further clarify the problem: Error executing SQL SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.SYSTEM_VIEWS WHERE TABLE_NAME = 'DEPARTMENTS_VW' AND TABLE_SCHEMA='PUBLIC' What appens at the end, unfortunately, is that neither of the messages is reported in the output of the program: conversely, the message reported: Error getting jdbc:hsqldb:hsql://localhost/testdb view with liquibase.statement.core.GetViewDefinitionStatement@a00185 is quite "enigmatic". I've see that the DatabaseException is wrapped by a ErrorPrecondition and futher by a PrecoditionErrorException (ViewExistsPrecondition.check(Database, DatabaseChangeLog, ChangeSet) line: 39): when the output message is built, the following fragment of code is executed (PreconditionContainer.check(Database, DatabaseChangeLog, ChangeSet) line: 227 ): catch (PreconditionErrorException e) { StringBuffer message = new StringBuffer(); message.append(" ").append(e.getErrorPreconditions().size()).append(" preconditions failed").append(StreamUtil.getLineSeparator()); for (ErrorPrecondition invalid : e.getErrorPreconditions()) { message.append(" ").append(invalid.toString()); message.append(StreamUtil.getLineSeparator()); } here is invoked the method toString on the istance of the class ErrorPrecondition: this method does not print the real cause. Here is an extract of my debugging environment (eclipse) where you may find the variables and some of their internal values, in particular I've found here the real "cause"(s) of the problem that aren't reported in the program output. invalid ErrorPrecondition (id=1756) cause DatabaseException (id=1764) cause DatabaseException (id=1744) cause SQLException (id=1725) cause null detailMessage "user lacks privilege or object not found: SYSTEM_VIEWS" (id=1729) detailMessage "Error executing SQL SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.SYSTEM_VIEWS WHERE TABLE_NAME = 'DEPARTMENTS_VW' AND TABLE_SCHEMA='PUBLIC'" (id=1745) detailMessage "Error getting jdbc:hsqldb:hsql://localhost/testdb view with liquibase.statement.core.GetViewDefinitionStatement@593f5a2f" (id=1774) stackTrace null changeLog DatabaseChangeLog (id=1752) precondition ViewExistsPrecondition (id=45) by the way: I don't know why in HSQL 1.9 (snapshot) the object INFORMATION_SCHEMA.SYSTEM_VIEWS does'nt exists anymore: instead exists the object INFORMATION_SCHEMA.VIEWS... Regards, Duccio

    JIRA | 7 years ago | Nathan Voxland
    liquibase.exception.MigrationFailedException: Migration failed for change set latest/vw/departments_vw.xml::1::jsmith: Reason: update.xml : Error getting jdbc:hsqldb:hsql://localhost/testdb view with liquibase.statement.core.GetViewDefinitionStatement@a00185 : Caused By: Precondition Error
  2. 0

    kind of "exception swallowing" - Liquibase Forums

    liquibase.org | 8 months ago
    liquibase.exception.MigrationFailedException: Migration failed for change set latest/vw/departments_vw.xml::1::jsmith:     Reason:          update.xml : Error getting jdbc:hsqldb:hsql://localhost/testdb view with liquibase.statement.core.GetViewDefinitionStatement@a00185 :          Caused By: Precondition Error
  3. 0

    From http://liquibase.org/forum/index.php?topic=221.0 Hello, I would like to signal a kind of "exception swallowing". I was testing LiquiBase Version: 2.0-rc2-SNAPSHOT against a test HSQL database whith the last snaphot jar of HSQLDB 1.9 released on 1 Nov (after RC6). I was running the command "liquibase --logLevel=debug --changeLogFile=update.xml update" whith my changelongs including this xml: <?xml version="1.0" encoding="UTF-8" standalone="no"?> <databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd"> <changeSet author="jsmith" id="1" runOnChange="true"> <preConditions onFail="MARK_RAN"> <viewExists viewName="departments_vw"/> </preConditions> <dropView viewName="departments_vw"/> </changeSet> <changeSet author="jsmith" id="2" runOnChange="true"> <createView viewName="departments_vw"> select id, dname from departments </createView> </changeSet> </databaseChangeLog> and I had this error: INFO 12/11/09 22.55:liquibase: Reading from DATABASECHANGELOG DEBUG 12/11/09 22.55:liquibase: Running Changeset:latest/vw/departments_vw.xml::1::jsmith::(Checksum: 2:d47fa6915fc3c813b6a0b666cdcb2601) DEBUG 12/11/09 22.55:liquibase: Changeset latest/vw/departments_vw.xml::1::jsmith::(Checksum: 2:d47fa6915fc3c813b6a0b666cdcb2601) DEBUG 12/11/09 22.55:liquibase: Release Database Lock INFO 12/11/09 22.55:liquibase: Successfully released change log lock LiquiBase Update Failed: Precondition Error INFO 12/11/09 22.55:liquibase: Precondition Error liquibase.exception.MigrationFailedException: Migration failed for change set latest/vw/departments_vw.xml::1::jsmith: Reason: update.xml : Error getting jdbc:hsqldb:hsql://localhost/testdb view with liquibase.statement.core.GetViewDefinitionStatement@a00185 : Caused By: Precondition Error at liquibase.changelog.ChangeSet.execute(ChangeSet.java:197) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:26) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:39) at liquibase.Liquibase.update(Liquibase.java:103) at liquibase.integration.commandline.Main.doMigration(Main.java:664) at liquibase.integration.commandline.Main.main(Main.java:105) Caused by: liquibase.exception.PreconditionErrorException: Precondition Error at liquibase.precondition.core.ViewExistsPrecondition.check(ViewExistsPrecondition.java:39) at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:24) at liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:199) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:163) ... 5 more Now, the problem it's not the error by itself, but the fact that I had no way to understand the real cause of the error! I debugged the application and here's what I discovered: the original DatabaseException is caught in class HsqlDatabaseSnapshotGenerator(JdbcDatabaseSnapshotGenerator).readView(ResultSet, Database) line: 146: in this fragment of code: try { view.setDefinition(database.getViewDefinition(rs.getString("TABLE_SCHEM"), name)); } catch (DatabaseException e) { throw new DatabaseException("Error getting " + database.getConnection().getURL() + " view with " + new GetViewDefinitionStatement(view.getSchema(), name), e); } and is generated in this fragment of code (in JdbcExecutor.execute(StatementCallback, List<SqlVisitor>) line: 58) public Object execute(StatementCallback action, List<SqlVisitor> sqlVisitors) throws DatabaseException { DatabaseConnection con = database.getConnection(); Statement stmt = null; try { stmt = ((JdbcConnection) con).getUnderlyingConnection().createStatement(); Statement stmtToUse = stmt; return action.doInStatement(stmtToUse); } catch (SQLException ex) { // Release Connection early, to avoid potential connection pool deadlock // in the case when the exception translator hasn't been initialized yet. JdbcUtils.closeStatement(stmt); stmt = null; throw new DatabaseException("Error executing SQL " + StringUtils.join(applyVisitors(action.getStatement(), sqlVisitors), ", "), ex); } finally { JdbcUtils.closeStatement(stmt); } } reached with the following stack: JdbcExecutor.execute(StatementCallback, List<SqlVisitor>) line: 58 JdbcExecutor.query(SqlStatement, ResultSetExtractor, List<SqlVisitor>) line: 124 JdbcExecutor.query(SqlStatement, RowMapper, List<SqlVisitor>) line: 132 JdbcExecutor.queryForObject(SqlStatement, RowMapper, List<SqlVisitor>) line: 140 JdbcExecutor.queryForObject(SqlStatement, Class, List<SqlVisitor>) line: 149 JdbcExecutor.queryForObject(SqlStatement, Class) line: 145 HsqlDatabase(AbstractDatabase).getViewDefinition(String, String) line: 608 HsqlDatabaseSnapshotGenerator(JdbcDatabaseSnapshotGenerator).readView(ResultSet, Database) line: 146 HsqlDatabaseSnapshotGenerator(JdbcDatabaseSnapshotGenerator).readViews(DatabaseSnapshot, String, DatabaseMetaData) line: 263 HsqlDatabaseSnapshotGenerator(JdbcDatabaseSnapshotGenerator).createSnapshot(Database, String, Set<DiffStatusListener>) line: 203 DatabaseSnapshotGeneratorFactory.createSnapshot(Database, String, Set<DiffStatusListener>) line: 69 ViewExistsPrecondition.check(Database, DatabaseChangeLog, ChangeSet) line: 37 PreconditionContainer(AndPrecondition).check(Database, DatabaseChangeLog, ChangeSet) line: 24 PreconditionContainer.check(Database, DatabaseChangeLog, ChangeSet) line: 199 ChangeSet.execute(DatabaseChangeLog, Database) line: 163 UpdateVisitor.visit(ChangeSet, DatabaseChangeLog, Database) line: 26 ChangeLogIterator.run(ChangeSetVisitor, Database) line: 39 Liquibase.update(String) line: 103 Main.doMigration() line: 664 Main.main(String[]) line: 105 The variable ex in the code above contains the real problem: java.sql.SQLException: user lacks privilege or object not found: SYSTEM_VIEWS and the message of the DatabaseException being thrown further clarify the problem: Error executing SQL SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.SYSTEM_VIEWS WHERE TABLE_NAME = 'DEPARTMENTS_VW' AND TABLE_SCHEMA='PUBLIC' What appens at the end, unfortunately, is that neither of the messages is reported in the output of the program: conversely, the message reported: Error getting jdbc:hsqldb:hsql://localhost/testdb view with liquibase.statement.core.GetViewDefinitionStatement@a00185 is quite "enigmatic". I've see that the DatabaseException is wrapped by a ErrorPrecondition and futher by a PrecoditionErrorException (ViewExistsPrecondition.check(Database, DatabaseChangeLog, ChangeSet) line: 39): when the output message is built, the following fragment of code is executed (PreconditionContainer.check(Database, DatabaseChangeLog, ChangeSet) line: 227 ): catch (PreconditionErrorException e) { StringBuffer message = new StringBuffer(); message.append(" ").append(e.getErrorPreconditions().size()).append(" preconditions failed").append(StreamUtil.getLineSeparator()); for (ErrorPrecondition invalid : e.getErrorPreconditions()) { message.append(" ").append(invalid.toString()); message.append(StreamUtil.getLineSeparator()); } here is invoked the method toString on the istance of the class ErrorPrecondition: this method does not print the real cause. Here is an extract of my debugging environment (eclipse) where you may find the variables and some of their internal values, in particular I've found here the real "cause"(s) of the problem that aren't reported in the program output. invalid ErrorPrecondition (id=1756) cause DatabaseException (id=1764) cause DatabaseException (id=1744) cause SQLException (id=1725) cause null detailMessage "user lacks privilege or object not found: SYSTEM_VIEWS" (id=1729) detailMessage "Error executing SQL SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.SYSTEM_VIEWS WHERE TABLE_NAME = 'DEPARTMENTS_VW' AND TABLE_SCHEMA='PUBLIC'" (id=1745) detailMessage "Error getting jdbc:hsqldb:hsql://localhost/testdb view with liquibase.statement.core.GetViewDefinitionStatement@593f5a2f" (id=1774) stackTrace null changeLog DatabaseChangeLog (id=1752) precondition ViewExistsPrecondition (id=45) by the way: I don't know why in HSQL 1.9 (snapshot) the object INFORMATION_SCHEMA.SYSTEM_VIEWS does'nt exists anymore: instead exists the object INFORMATION_SCHEMA.VIEWS... Regards, Duccio

    JIRA | 7 years ago | Nathan Voxland
    liquibase.exception.MigrationFailedException: Migration failed for change set latest/vw/departments_vw.xml::1::jsmith: Reason: update.xml : Error getting jdbc:hsqldb:hsql://localhost/testdb view with liquibase.statement.core.GetViewDefinitionStatement@a00185 : Caused By: Precondition Error
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Trying the support for offline SQL generation (implemented in CORE-883 and documented [here|http://www.liquibase.org/documentation/offline.html]). I have a change log with change sets that have preconditions (that access the DB) and are set as onSqlOutput="TEST". I am seeing quite erratic behavior. Any of the following may happen: # the changelog is processed and the expected SQL is generated (preconditions are not executed) # the changelog is processed with the preconditions deemed as unsatisfied (probably not actually executed) # the changelog processing fails due to the precondition being evaluated (stack trace below) The bare expectation is that it worked always the same way (note that the offline mode generates a csv file that if not deleted will affect the result of a following execution). In my tests I always delete the file. {code} SEVERE 12/12/14 15:51: liquibase: ...: liquibase.precondition.core.ColumnExistsPrecondition@252b6749 : Cannot snapshot offline database liquibase.exception.MigrationFailedException: Migration failed for change set changelog/db-changelog-3.7.1.xml::3.7.1_mychangeset::mycorp: Reason: changelog/db-changelog-3.7.1.xml : liquibase.precondition.core.ColumnE xistsPrecondition@252b6749 : Cannot snapshot offline database at liquibase.changelog.ChangeSet.execute(ChangeSet.java:482) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43 ) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:70) at liquibase.Liquibase.update(Liquibase.java:195) at liquibase.Liquibase.update(Liquibase.java:246) at liquibase.Liquibase.update(Liquibase.java:229) at liquibase.integration.commandline.Main.doMigration(Main.java:1006) at liquibase.integration.commandline.Main.run(Main.java:170) at liquibase.integration.commandline.Main.main(Main.java:89) Caused by: liquibase.exception.PreconditionErrorException: Precondition Error at liquibase.precondition.core.ColumnExistsPrecondition.check(ColumnExis tsPrecondition.java:81) at liquibase.precondition.core.NotPrecondition.check(NotPrecondition.jav a:38) at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.jav a:43) at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.jav a:43) at liquibase.precondition.core.PreconditionContainer.check(PreconditionC ontainer.java:201) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:439) ... 8 more Caused by: liquibase.exception.DatabaseException: Cannot snapshot offline databa se at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGe neratorFactory.java:124) at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGe neratorFactory.java:134) at liquibase.snapshot.SnapshotGeneratorFactory.has(SnapshotGeneratorFact ory.java:88) at liquibase.precondition.core.ColumnExistsPrecondition.check(ColumnExis tsPrecondition.java:77) ... 13 more Unexpected error running Liquibase: Precondition Error SEVERE 12/12/14 15:51: liquibase: changelog/db-changelog-3.7.1.xml::3.7.1_mychangeset::mycorp: Precondition Error liquibase.exception.MigrationFailedException: Migration failed for change set changelog/db-changelog-3.7.1.xml::3.7.1_mychangeset::mycorp: Reason: changelog/db-changelog-3.7.1.xml : liquibase.precondition.core.ColumnExistsPrecondition@252b6749 : Cannot snapshot offline database at liquibase.changelog.ChangeSet.execute(ChangeSet.java:482) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:70) at liquibase.Liquibase.update(Liquibase.java:195) at liquibase.Liquibase.update(Liquibase.java:246) at liquibase.Liquibase.update(Liquibase.java:229) at liquibase.integration.commandline.Main.doMigration(Main.java:1006) at liquibase.integration.commandline.Main.run(Main.java:170) at liquibase.integration.commandline.Main.main(Main.java:89) Caused by: liquibase.exception.PreconditionErrorException: Precondition Error at liquibase.precondition.core.ColumnExistsPrecondition.check(ColumnExis tsPrecondition.java:81) at liquibase.precondition.core.NotPrecondition.check(NotPrecondition.jav a:38) at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.jav a:43) at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.jav a:43) at liquibase.precondition.core.PreconditionContainer.check(PreconditionC ontainer.java:201) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:439) ... 8 more Caused by: liquibase.exception.DatabaseException: Cannot snapshot offline database at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:124) at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:134) at liquibase.snapshot.SnapshotGeneratorFactory.has(SnapshotGeneratorFactory.java:88) at liquibase.precondition.core.ColumnExistsPrecondition.check(ColumnExis tsPrecondition.java:77) ... 13 more {code}

    JIRA | 2 years ago | Rafael Chaves
    liquibase.exception.MigrationFailedException: Migration failed for change set changelog/db-changelog-3.7.1.xml::3.7.1_mychangeset::mycorp: Reason: changelog/db-changelog-3.7.1.xml : liquibase.precondition.core.ColumnE xistsPrecondition@252b6749 : Cannot snapshot offline database
  6. 0

    Not null sqlCheck in Liquibase precondition

    Stack Overflow | 2 years ago | Grzegorz Olszewski
    liquibase.exception.MigrationFailedException: Migration failed for change set /tmp/test.changeset.xml::4::test: Reason: /tmp/test.changeset.xml : No rows returned from SQL Precondition

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

      Precondition Error

      at liquibase.precondition.core.ViewExistsPrecondition.check()
    2. Liquibase Core
      Main.main
      1. liquibase.precondition.core.ViewExistsPrecondition.check(ViewExistsPrecondition.java:39)
      2. liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:24)
      3. liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:199)
      4. liquibase.changelog.ChangeSet.execute(ChangeSet.java:163)
      5. liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:26)
      6. liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:39)
      7. liquibase.Liquibase.update(Liquibase.java:103)
      8. liquibase.integration.commandline.Main.doMigration(Main.java:664)
      9. liquibase.integration.commandline.Main.main(Main.java:105)
      9 frames