liquibase.exception.LiquibaseException

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.

  • Liquibase Hibernate Plugin Does Not Work
    via Stack Overflow by Jazzepi
    ,
  • Using diffChangeLog on the following two PostgreSQL databases: -- source CREATE SCHEMA test; CREATE TABLE test."PARENT" (id integer PRIMARY KEY); CREATE TABLE child (id integer, parent integer REFERENCES test."PARENT"(id)); -- target CREATE SCHEMA test; CREATE TABLE test."PARENT" (id integer PRIMARY KEY); gives me this NullPointerException: liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:107) at liquibase.integration.commandline.Main.doMigration(Main.java:889) at liquibase.integration.commandline.Main.run(Main.java:170) at liquibase.integration.commandline.Main.main(Main.java:89) Caused by: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13) at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:105) ... 3 more Caused by: java.lang.NullPointerException at liquibase.diff.output.changelog.core.MissingForeignKeyChangeGenerator.fixMissing(MissingForeignKeyChangeGenerator.java:43) at liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:44) at liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:99) at liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:147) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:127) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:65) at liquibase.command.DiffToChangeLogCommand.run(DiffToChangeLogCommand.java:59) at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8) ... 4 more This does not occur when the referenced table is named all lowercase. Here is an extract from the diff command. Note the "null": Missing Column(s): child.id child.parent Missing Foreign Key(s): child_parent_fkey(child.parent -> null.id) Missing Table(s): child
    via by Jan Strube,
  • When I create a conditional Index in PostgreSQL, Liquibase cannot generate a Changelog anymore. Database: {code:sql} CREATE TABLE events (active BOOLEAN); CREATE INDEX active_events ON events (active) WHERE active; {code} Command line: {noformat} C:\TEMP\liquibug>liquibase --changeLogFile=output.xml --logLevel=info generateChangelog INFO 09.06.15 19:04: liquibase: output.xml does not exist, creating Unexpected error running Liquibase: java.lang.NullPointerException SEVERE 09.06.15 19:04: liquibase: java.lang.NullPointerException liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:155) at liquibase.integration.commandline.Main.doMigration(Main.java:951) at liquibase.integration.commandline.Main.run(Main.java:175) at liquibase.integration.commandline.Main.main(Main.java:94) Caused by: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13) at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:153) ... 3 more Caused by: java.lang.NullPointerException at liquibase.datatype.DataTypeFactory.from(DataTypeFactory.java:206) at liquibase.diff.output.changelog.core.MissingTableChangeGenerator.fixMissing(MissingTableChangeGenerator.java:69) at liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:48) at liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:99) at liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:145) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:125) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:76) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:64) at liquibase.command.GenerateChangeLogCommand.run(GenerateChangeLogCommand.java:54) at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8) ... 4 more For more information, use the --logLevel flag C:\TEMP\liquibug> {noformat}
    via by Henning Hoefer,
  • I upgraded from 3.4.2 to 3.5.0 and reran all my diff batch files. They all generated the following traceback: {code:java} Unexpected error running Liquibase: java.lang.NullPointerException SEVERE 4/22/16 9:28 AM: liquibase: java.lang.NullPointerException liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.integration.commandline.CommandLineUtils.doDiff(CommandLineUtils.java:200) at liquibase.integration.commandline.Main.doMigration(Main.java:989) at liquibase.integration.commandline.Main.run(Main.java:184) at liquibase.integration.commandline.Main.main(Main.java:103) Caused by: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13) at liquibase.integration.commandline.CommandLineUtils.doDiff(CommandLineUtils.java:198) ... 3 more Caused by: java.lang.NullPointerException at liquibase.diff.output.report.DiffToReport$1.toString(DiffToReport.java:39) at liquibase.diff.output.report.DiffToReport$1.toString(DiffToReport.java:34) at liquibase.util.StringUtils.join(StringUtils.java:142) at liquibase.diff.output.report.DiffToReport.print(DiffToReport.java:34) at liquibase.command.DiffCommand.run(DiffCommand.java:135) at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8) ... 4 more {code} This seems to be the result of the recent push under CORE-2615. I was able to get around the issue by switching the side that "name" was on in the comparison like this: {code:java} for (CompareControl.SchemaComparison comparison : diffResult.getCompareControl().getSchemaComparisons()) { if (name.equals(comparison.getReferenceSchema().getCatalogName())) { name += " -> "+comparison.getComparisonSchema().getCatalogName(); } else if (name.equals(comparison.getReferenceSchema().getSchemaName())) { name += " -> "+comparison.getComparisonSchema().getSchemaName(); } else if (name.equals(comparison.getComparisonSchema().getCatalogName())) { name += " -> "+comparison.getReferenceSchema().getCatalogName(); } else if (name.equals(comparison.getComparisonSchema().getSchemaName())) { name += " -> "+comparison.getReferenceSchema().getSchemaName(); } } {code} I've attached a patch with the change.
    via by David Malkovsky,
  • When comparing 2 databases diff fails with NullPointerException: DEBUG 27.4.16 12:56: liquibase: Executing QUERY database command: SELECT CAST([ep].[value] AS [nvarchar](MAX)) AS [REMARKS] FROM [sys].[extended_properties] AS [ep] WHERE [ep].[class] = 1 AND [ep].[major_id] = OBJECT_ID(N'[xxx1 ].[dbo].[Lic_Akce_MVA_ModelovaRada]') AND [ep].[minor_id] = COLUMNPROPERTY([ep].[major_id], N'AkceModelovaRadaId', 'ColumnId') AND [ep].[name] = 'MS_Description' Reference Database: xxx2 @ jdbc:sqlserver://aaa.bbb.cz:1433;xopenStates=false;trustServerCertificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout =15;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;applicationName=Microsoft SQL Server JDBC Driver; (Default Schema: dbo) Comparison Database: xxx1 @ jdbc:sqlserver://aaa.bbb.cz:1433;xopenStates=false;trustServerCertificate=false;sendStringParametersAsUnicode=true;selectMethod=direct;responseBuffering=adaptive;packetSize=8000;loginTimeout=1 5;lockTimeout=-1;lastUpdateCount=true;encrypt=false;disableStatementPooling=true;applicationName=Microsoft SQL Server JDBC Driver; (Default Schema: dbo) Unexpected error running Liquibase: java.lang.NullPointerException SEVERE 27.4.16 12:56: liquibase: java.lang.NullPointerException liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.integration.commandline.CommandLineUtils.doDiff(CommandLineUtils.java:200) at liquibase.integration.commandline.Main.doMigration(Main.java:989) at liquibase.integration.commandline.Main.run(Main.java:184) at liquibase.integration.commandline.Main.main(Main.java:103) Caused by: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13) at liquibase.integration.commandline.CommandLineUtils.doDiff(CommandLineUtils.java:198) ... 3 more Caused by: java.lang.NullPointerException at liquibase.diff.output.report.DiffToReport$1.toString(DiffToReport.java:39) at liquibase.diff.output.report.DiffToReport$1.toString(DiffToReport.java:34) at liquibase.util.StringUtils.join(StringUtils.java:142) at liquibase.diff.output.report.DiffToReport.print(DiffToReport.java:34) at liquibase.command.DiffCommand.run(DiffCommand.java:135) at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8) ... 4 more
    via by Ales Tmej,
  • Running command diff with two databases on same PostgreSQL server fails with NullPointerException: {noformat} DEBUG 28.04.16 14:22: liquibase: Executing QUERY database command: select definition from pg_views where viewname='usr_pass' AND schemaname='jackplus' Unexpected error running Liquibase: java.lang.NullPointerException SEVERE 28.04.16 14:22: liquibase: java.lang.NullPointerException liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.integration.commandline.CommandLineUtils.doDiff(CommandLineUtils.java:200) at liquibase.integration.commandline.Main.doMigration(Main.java:989) at liquibase.integration.commandline.Main.run(Main.java:184) at liquibase.integration.commandline.Main.main(Main.java:103) Caused by: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13) at liquibase.integration.commandline.CommandLineUtils.doDiff(CommandLineUtils.java:198) ... 3 more Caused by: java.lang.NullPointerException at liquibase.diff.output.report.DiffToReport$1.toString(DiffToReport.java:39) at liquibase.diff.output.report.DiffToReport$1.toString(DiffToReport.java:34) at liquibase.util.StringUtils.join(StringUtils.java:142) at liquibase.diff.output.report.DiffToReport.print(DiffToReport.java:34) at liquibase.command.DiffCommand.run(DiffCommand.java:135) at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8) ... 4 more {noformat} Running "snapshot" or "snapshotReference" instead of "diff" is working.
    via by Jens Schumacher,
  • Using diffChangeLog on the following two PostgreSQL databases: -- source CREATE SCHEMA test; CREATE TABLE test."PARENT" (id integer PRIMARY KEY); CREATE TABLE child (id integer, parent integer REFERENCES test."PARENT"(id)); -- target CREATE SCHEMA test; CREATE TABLE test."PARENT" (id integer PRIMARY KEY); gives me this NullPointerException: liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:107) at liquibase.integration.commandline.Main.doMigration(Main.java:889) at liquibase.integration.commandline.Main.run(Main.java:170) at liquibase.integration.commandline.Main.main(Main.java:89) Caused by: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13) at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:105) ... 3 more Caused by: java.lang.NullPointerException at liquibase.diff.output.changelog.core.MissingForeignKeyChangeGenerator.fixMissing(MissingForeignKeyChangeGenerator.java:43) at liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:44) at liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:99) at liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:147) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:127) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:65) at liquibase.command.DiffToChangeLogCommand.run(DiffToChangeLogCommand.java:59) at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8) ... 4 more This does not occur when the referenced table is named all lowercase. Here is an extract from the diff command. Note the "null": Missing Column(s): child.id child.parent Missing Foreign Key(s): child_parent_fkey(child.parent -> null.id) Missing Table(s): child
    via by Jan Strube,
  • When I create a conditional Index in PostgreSQL, Liquibase cannot generate a Changelog anymore. Database: {code:sql} CREATE TABLE events (active BOOLEAN); CREATE INDEX active_events ON events (active) WHERE active; {code} Command line: {noformat} C:\TEMP\liquibug>liquibase --changeLogFile=output.xml --logLevel=info generateChangelog INFO 09.06.15 19:04: liquibase: output.xml does not exist, creating Unexpected error running Liquibase: java.lang.NullPointerException SEVERE 09.06.15 19:04: liquibase: java.lang.NullPointerException liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:155) at liquibase.integration.commandline.Main.doMigration(Main.java:951) at liquibase.integration.commandline.Main.run(Main.java:175) at liquibase.integration.commandline.Main.main(Main.java:94) Caused by: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13) at liquibase.integration.commandline.CommandLineUtils.doGenerateChangeLog(CommandLineUtils.java:153) ... 3 more Caused by: java.lang.NullPointerException at liquibase.datatype.DataTypeFactory.from(DataTypeFactory.java:206) at liquibase.diff.output.changelog.core.MissingTableChangeGenerator.fixMissing(MissingTableChangeGenerator.java:69) at liquibase.diff.output.changelog.ChangeGeneratorChain.fixMissing(ChangeGeneratorChain.java:48) at liquibase.diff.output.changelog.ChangeGeneratorFactory.fixMissing(ChangeGeneratorFactory.java:99) at liquibase.diff.output.changelog.DiffToChangeLog.generateChangeSets(DiffToChangeLog.java:145) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:125) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:76) at liquibase.diff.output.changelog.DiffToChangeLog.print(DiffToChangeLog.java:64) at liquibase.command.GenerateChangeLogCommand.run(GenerateChangeLogCommand.java:54) at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8) ... 4 more For more information, use the --logLevel flag C:\TEMP\liquibug> {noformat}
    via by Henning Hoefer,
    • liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:123) at liquibase.integration.commandline.Main.doMigration(Main.java:936) at liquibase.integration.commandline.Main.run(Main.java:175) at liquibase.integration.commandline.Main.main(Main.java:94) Caused by: liquibase.command.CommandExecutionException: java.lang.NullPointerException at liquibase.command.AbstractCommand.execute(AbstractCommand.java:13) at liquibase.integration.commandline.CommandLineUtils.doDiffToChangeLog(CommandLineUtils.java:121) ... 3 more Caused by: java.lang.NullPointerException at liquibase.snapshot.jvm.CatalogSnapshotGenerator.getDatabaseCatalogNames(CatalogSnapshotGenerator.java:82) at liquibase.snapshot.jvm.CatalogSnapshotGenerator.snapshotObject(CatalogSnapshotGenerator.java:41) at liquibase.snapshot.jvm.JdbcSnapshotGenerator.snapshot(JdbcSnapshotGenerator.java:60) at liquibase.snapshot.SnapshotGeneratorChain.snapshot(SnapshotGeneratorChain.java:50) at liquibase.snapshot.DatabaseSnapshot.include(DatabaseSnapshot.java:163) at liquibase.snapshot.DatabaseSnapshot.init(DatabaseSnapshot.java:55) at liquibase.snapshot.DatabaseSnapshot.<init>(DatabaseSnapshot.java:37) at liquibase.snapshot.JdbcDatabaseSnapshot.<init>(JdbcDatabaseSnapshot.java:25) at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:126) at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:119) at liquibase.command.DiffCommand.createReferenceSnapshot(DiffCommand.java:190) at liquibase.command.DiffCommand.createDiffResult(DiffCommand.java:140) at liquibase.command.DiffToChangeLogCommand.run(DiffToChangeLogCommand.java:51) at liquibase.command.AbstractCommand.execute(AbstractCommand.java:8) ... 4 more
    No Bugmate found.