java.lang.NullPointerException

JIRA | Goran Lowkrantz | 2 years ago
  1. 0

    While creating a converter for xom Documents to DatabaseChangeLogs, if the new DatabaseChangeLog is created using the default constructor, it will NPE. Workaround: Use the String constructor with an empty string. {noformat} INFO 3/9/15 6:03 PM: liquibase: Successfully acquired change log lock INFO 3/9/15 6:03 PM: liquibase: Reading from public.databasechangelog INFO 3/9/15 6:03 PM: liquibase: Successfully released change log lock Exception in thread "main" java.lang.NullPointerException at liquibase.changelog.filter.ShouldRunChangeSetFilter.normalizePath(ShouldRunChangeSetFilter.java:74) at liquibase.changelog.filter.ShouldRunChangeSetFilter.getPath(ShouldRunChangeSetFilter.java:69) at liquibase.changelog.filter.ShouldRunChangeSetFilter.pathsAreEqual(ShouldRunChangeSetFilter.java:56) at liquibase.changelog.filter.ShouldRunChangeSetFilter.changeSetsMatch(ShouldRunChangeSetFilter.java:42) at liquibase.changelog.filter.ShouldRunChangeSetFilter.accepts(ShouldRunChangeSetFilter.java:28) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:60) at liquibase.Liquibase.update(Liquibase.java:200) at liquibase.Liquibase.update(Liquibase.java:181) at com.ismobile.CheckXMLSubst.main(CheckXMLSubst.java:54) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) {noformat}

    JIRA | 2 years ago | Goran Lowkrantz
    java.lang.NullPointerException
  2. 0

    While creating a converter for xom Documents to DatabaseChangeLogs, if the new DatabaseChangeLog is created using the default constructor, it will NPE. Workaround: Use the String constructor with an empty string. {noformat} INFO 3/9/15 6:03 PM: liquibase: Successfully acquired change log lock INFO 3/9/15 6:03 PM: liquibase: Reading from public.databasechangelog INFO 3/9/15 6:03 PM: liquibase: Successfully released change log lock Exception in thread "main" java.lang.NullPointerException at liquibase.changelog.filter.ShouldRunChangeSetFilter.normalizePath(ShouldRunChangeSetFilter.java:74) at liquibase.changelog.filter.ShouldRunChangeSetFilter.getPath(ShouldRunChangeSetFilter.java:69) at liquibase.changelog.filter.ShouldRunChangeSetFilter.pathsAreEqual(ShouldRunChangeSetFilter.java:56) at liquibase.changelog.filter.ShouldRunChangeSetFilter.changeSetsMatch(ShouldRunChangeSetFilter.java:42) at liquibase.changelog.filter.ShouldRunChangeSetFilter.accepts(ShouldRunChangeSetFilter.java:28) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:60) at liquibase.Liquibase.update(Liquibase.java:200) at liquibase.Liquibase.update(Liquibase.java:181) at com.ismobile.CheckXMLSubst.main(CheckXMLSubst.java:54) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) {noformat}

    JIRA | 2 years ago | Goran Lowkrantz
    java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Dropwizard has upgraded to liquibase 3.0.1, and when I try to run liquibase's update command I get the following exception: {code} Exception in thread "main" java.lang.NullPointerException at liquibase.diff.compare.DatabaseObjectComparatorFactory.isSameObject(DatabaseObjectComparatorFactory.java:91) at liquibase.snapshot.DatabaseSnapshot.get(DatabaseSnapshot.java:180) at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:137) at liquibase.snapshot.SnapshotGeneratorFactory.has(SnapshotGeneratorFactory.java:87) at liquibase.snapshot.SnapshotGeneratorFactory.hasDatabaseChangeLogTable(SnapshotGeneratorFactory.java:160) at liquibase.database.AbstractJdbcDatabase.hasDatabaseChangeLogTable(AbstractJdbcDatabase.java:726) at liquibase.database.AbstractJdbcDatabase.getRanChangeSetList(AbstractJdbcDatabase.java:1127) at liquibase.database.AbstractJdbcDatabase.checkDatabaseChangeLogTable(AbstractJdbcDatabase.java:695) at liquibase.Liquibase.checkDatabaseChangeLogTable(Liquibase.java:602) at liquibase.Liquibase.update(Liquibase.java:130) at com.codahale.dropwizard.migrations.DbMigrateCommand.run(DbMigrateCommand.java:58) at com.codahale.dropwizard.migrations.DbCommand.run(DbCommand.java:51) at com.codahale.dropwizard.migrations.AbstractLiquibaseCommand.run(AbstractLiquibaseCommand.java:54) at com.codahale.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:62) at com.codahale.dropwizard.cli.Cli.run(Cli.java:69) at com.codahale.dropwizard.Application.run(Application.java:72) at com.example.helloworld.HelloWorldApplication.main(HelloWorldApplication.java:22) {code} I tracked this down to {{liquibase.diff}} (and after fixing that, {{liquibase.datatype}}) not being in the default packagesToScan list specified in {{liquibase.servicelocator.ServiceLocator}}. I changed the list to match the values in META-INF/MANIFEST.MF, and that got me going. I realize I could also fix it by specifying the {{liquibase.scan.packages}} system property, but it looks like the default packagesToScan list was in sync with the manifest at one point and should be updated. I'll submit a pull request with the change.

    JIRA | 3 years ago | Robert Rasmussen
    java.lang.NullPointerException
  5. 0

    Dropwizard has upgraded to liquibase 3.0.1, and when I try to run liquibase's update command I get the following exception: {code} Exception in thread "main" java.lang.NullPointerException at liquibase.diff.compare.DatabaseObjectComparatorFactory.isSameObject(DatabaseObjectComparatorFactory.java:91) at liquibase.snapshot.DatabaseSnapshot.get(DatabaseSnapshot.java:180) at liquibase.snapshot.SnapshotGeneratorFactory.createSnapshot(SnapshotGeneratorFactory.java:137) at liquibase.snapshot.SnapshotGeneratorFactory.has(SnapshotGeneratorFactory.java:87) at liquibase.snapshot.SnapshotGeneratorFactory.hasDatabaseChangeLogTable(SnapshotGeneratorFactory.java:160) at liquibase.database.AbstractJdbcDatabase.hasDatabaseChangeLogTable(AbstractJdbcDatabase.java:726) at liquibase.database.AbstractJdbcDatabase.getRanChangeSetList(AbstractJdbcDatabase.java:1127) at liquibase.database.AbstractJdbcDatabase.checkDatabaseChangeLogTable(AbstractJdbcDatabase.java:695) at liquibase.Liquibase.checkDatabaseChangeLogTable(Liquibase.java:602) at liquibase.Liquibase.update(Liquibase.java:130) at com.codahale.dropwizard.migrations.DbMigrateCommand.run(DbMigrateCommand.java:58) at com.codahale.dropwizard.migrations.DbCommand.run(DbCommand.java:51) at com.codahale.dropwizard.migrations.AbstractLiquibaseCommand.run(AbstractLiquibaseCommand.java:54) at com.codahale.dropwizard.cli.ConfiguredCommand.run(ConfiguredCommand.java:62) at com.codahale.dropwizard.cli.Cli.run(Cli.java:69) at com.codahale.dropwizard.Application.run(Application.java:72) at com.example.helloworld.HelloWorldApplication.main(HelloWorldApplication.java:22) {code} I tracked this down to {{liquibase.diff}} (and after fixing that, {{liquibase.datatype}}) not being in the default packagesToScan list specified in {{liquibase.servicelocator.ServiceLocator}}. I changed the list to match the values in META-INF/MANIFEST.MF, and that got me going. I realize I could also fix it by specifying the {{liquibase.scan.packages}} system property, but it looks like the default packagesToScan list was in sync with the manifest at one point and should be updated. I'll submit a pull request with the change.

    JIRA | 3 years ago | Robert Rasmussen
    java.lang.NullPointerException

    1 unregistered visitors
    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.changelog.filter.ShouldRunChangeSetFilter.normalizePath()
    2. Liquibase Core
      Liquibase.update
      1. liquibase.changelog.filter.ShouldRunChangeSetFilter.normalizePath(ShouldRunChangeSetFilter.java:74)
      2. liquibase.changelog.filter.ShouldRunChangeSetFilter.getPath(ShouldRunChangeSetFilter.java:69)
      3. liquibase.changelog.filter.ShouldRunChangeSetFilter.pathsAreEqual(ShouldRunChangeSetFilter.java:56)
      4. liquibase.changelog.filter.ShouldRunChangeSetFilter.changeSetsMatch(ShouldRunChangeSetFilter.java:42)
      5. liquibase.changelog.filter.ShouldRunChangeSetFilter.accepts(ShouldRunChangeSetFilter.java:28)
      6. liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:60)
      7. liquibase.Liquibase.update(Liquibase.java:200)
      8. liquibase.Liquibase.update(Liquibase.java:181)
      8 frames
    3. com.ismobile
      CheckXMLSubst.main
      1. com.ismobile.CheckXMLSubst.main(CheckXMLSubst.java:54)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    5. IDEA
      AppMain.main
      1. com.intellij.rt.execution.application.AppMain.main(AppMain.java:134)
      1 frame