java.lang.NullPointerException: null

JIRA | Sujay Bawaskar | 6 months ago
  1. Speed up your debug routine!

    Automated exception search integrated into your IDE

  2. 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
  3. 0

    SEVERE 9/2/13 12:08 AM:liquibase: Change Set src/main/resources/changelog::26.8.2013_2::AAA failed. Error: Migration failed for change set src/main/resources/changelog::26.8.2013_2::AAA: Reason: src/main/resources/master-changelog.xml : liquibase.precondition.core.IndexExistsPrecondition@2026c088 : java.lang.NullPointerException liquibase.exception.MigrationFailedException: Migration failed for change set src/main/resources/changelog::26.8.2013_2::AAA: Reason: src/main/resources/master-changelog.xml : liquibase.precondition.core.IndexExistsPrecondition@2026c088 : java.lang.NullPointerException at liquibase.changelog.ChangeSet.execute(ChangeSet.java:310) at liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:28) at liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58) at liquibase.Liquibase.update(Liquibase.java:135) at org.liquibase.maven.plugins.LiquibaseUpdate.doUpdate(LiquibaseUpdate.java:31) at org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojo.performLiquibaseTask(AbstractLiquibaseUpdateMojo.java:24) at org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:375) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196) at org.apache.maven.cli.MavenCli.main(MavenCli.java:141) 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 org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290) at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230) at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409) at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352) Caused by: liquibase.exception.PreconditionErrorException: Precondition Error at liquibase.precondition.core.IndexExistsPrecondition.check(IndexExistsPrecondition.java:111) at liquibase.precondition.core.NotPrecondition.check(NotPrecondition.java:30) at liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:34) at liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:199) at liquibase.changelog.ChangeSet.execute(ChangeSet.java:274) ... 27 more

    JIRA | 3 years ago | Jiri Pejchal
    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

      null

      at liquibase.Liquibase.update()
    2. Liquibase Core
      Liquibase.update
      1. liquibase.Liquibase.update(Liquibase.java:195)
      2. liquibase.Liquibase.update(Liquibase.java:192)
      3. liquibase.Liquibase.update(Liquibase.java:188)
      4. liquibase.Liquibase.update(Liquibase.java:181)
      4 frames