liquibase.exception.DatabaseException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I have a change log using a sqlFile changeset, and I am finding various issues with comments. The one at hand: if a comment line ends with semicolon, it seems Liquibase will see it as a statement to execute. For instance, if my SQL file looks like this: {code} -- This one is ignored -- This too is ignored; as the semicolon is not the last character -- This is just a comment but Liquibase will try to execute it; CREATE TABLE MY_TABLE ( column1 VARCHAR(50)); {code} Liquibase will try to execute the three comments as a statement (I gather because it sees line-ending semi-colons as indication of statements): {code} DEBUG 1/27/15 6:55 PM: liquibase: changelog/db-changelog-master.xml: changelog/db-changelog-3.7-initial.xml::3.7_initial::pixeon: Executing EXECUTE database command: -- This one is ignored -- This too is ignored; as the semicolon is not the last character -- This is just a comment but Liquibase will try to execute it SEVERE 1/27/15 6:55 PM: liquibase: changelog/db-changelog-master.xml: changelog/db-changelog-3.7-initial.xml::3.7_initial::pixeon: Change Set changelog/db-changelog-3.7-initial.xml::3.7_initial::pixeon failed. Error: java.lang.NullPointerException liquibase.exception.DatabaseException: java.lang.NullPointerException at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1227) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1210) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:550) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73) at liquibase.Liquibase.update(Liquibase.java:200) at liquibase.integration.commandline.Main.doMigration(Main.java:1044) at liquibase.integration.commandline.Main.run(Main.java:175) at liquibase.integration.commandline.Main.main(Main.java:94) Caused by: java.lang.NullPointerException at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java:973) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1041) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329) at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1909) at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871) at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318) at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314) ... 11 more {code}
    via by Rafael Chaves,
  • I have a change log using a sqlFile changeset, and I am finding various issues with comments. The one at hand: if a comment line ends with semicolon, it seems Liquibase will see it as a statement to execute. For instance, if my SQL file looks like this: {code} -- This one is ignored -- This too is ignored; as the semicolon is not the last character -- This is just a comment but Liquibase will try to execute it; CREATE TABLE MY_TABLE ( column1 VARCHAR(50)); {code} Liquibase will try to execute the three comments as a statement (I gather because it sees line-ending semi-colons as indication of statements): {code} DEBUG 1/27/15 6:55 PM: liquibase: changelog/db-changelog-master.xml: changelog/db-changelog-3.7-initial.xml::3.7_initial::pixeon: Executing EXECUTE database command: -- This one is ignored -- This too is ignored; as the semicolon is not the last character -- This is just a comment but Liquibase will try to execute it SEVERE 1/27/15 6:55 PM: liquibase: changelog/db-changelog-master.xml: changelog/db-changelog-3.7-initial.xml::3.7_initial::pixeon: Change Set changelog/db-changelog-3.7-initial.xml::3.7_initial::pixeon failed. Error: java.lang.NullPointerException liquibase.exception.DatabaseException: java.lang.NullPointerException at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1227) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1210) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:550) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73) at liquibase.Liquibase.update(Liquibase.java:200) at liquibase.integration.commandline.Main.doMigration(Main.java:1044) at liquibase.integration.commandline.Main.run(Main.java:175) at liquibase.integration.commandline.Main.main(Main.java:94) Caused by: java.lang.NullPointerException at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java:973) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1041) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329) at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1909) at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871) at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318) at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314) ... 11 more {code}
    via by Rafael Chaves,
    • liquibase.exception.DatabaseException: java.lang.NullPointerException at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:316) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:55) at liquibase.executor.jvm.JdbcExecutor.execute(JdbcExecutor.java:122) at liquibase.database.AbstractJdbcDatabase.execute(AbstractJdbcDatabase.java:1227) at liquibase.database.AbstractJdbcDatabase.executeStatements(AbstractJdbcDatabase.java:1210) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:550) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:43) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:73) at liquibase.Liquibase.update(Liquibase.java:200) at liquibase.integration.commandline.Main.doMigration(Main.java:1044) at liquibase.integration.commandline.Main.run(Main.java:175) at liquibase.integration.commandline.Main.main(Main.java:94) Caused by: java.lang.NullPointerException at oracle.jdbc.driver.T4C8Oall.getNumRows(T4C8Oall.java:973) at oracle.jdbc.driver.T4CStatement.executeForRows(T4CStatement.java:1041) at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1329) at oracle.jdbc.driver.OracleStatement.executeInternal(OracleStatement.java:1909) at oracle.jdbc.driver.OracleStatement.execute(OracleStatement.java:1871) at oracle.jdbc.driver.OracleStatementWrapper.execute(OracleStatementWrapper.java:318) at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:314) ... 11 more

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    KawadaKawada
    4 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor3 times, last one,
    1 more bugmates