liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException

JIRA | Jens Schumacher | 7 months ago
  1. 0

    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.

    JIRA | 7 months ago | David Malkovsky
    liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException
  2. 0

    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

    JIRA | 7 months ago | Ales Tmej
    liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException
  3. 0

    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.

    JIRA | 7 months ago | Jens Schumacher
    liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    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.

    JIRA | 7 months ago | David Malkovsky
    liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException
  6. 0

    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

    JIRA | 7 months ago | Ales Tmej
    liquibase.exception.LiquibaseException: liquibase.command.CommandExecutionException: java.lang.NullPointerException

    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. java.lang.NullPointerException

      No message provided

      at liquibase.diff.output.report.DiffToReport$1.toString()
    2. Liquibase Core
      Main.main
      1. liquibase.diff.output.report.DiffToReport$1.toString(DiffToReport.java:39)
      2. liquibase.diff.output.report.DiffToReport$1.toString(DiffToReport.java:34)
      3. liquibase.util.StringUtils.join(StringUtils.java:142)
      4. liquibase.diff.output.report.DiffToReport.print(DiffToReport.java:34)
      5. liquibase.command.DiffCommand.run(DiffCommand.java:135)
      6. liquibase.command.AbstractCommand.execute(AbstractCommand.java:8)
      7. liquibase.integration.commandline.CommandLineUtils.doDiff(CommandLineUtils.java:198)
      8. liquibase.integration.commandline.Main.doMigration(Main.java:989)
      9. liquibase.integration.commandline.Main.run(Main.java:184)
      10. liquibase.integration.commandline.Main.main(Main.java:103)
      10 frames