java.lang.NullPointerException

JIRA | Jiri Pejchal | 4 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 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 | 4 years ago | Jiri Pejchal
    java.lang.NullPointerException
  2. 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 | 4 years ago | Jiri Pejchal
    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 | 4 years ago | Robert Rasmussen
    java.lang.NullPointerException
  5. 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

    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. liquibase.exception.PreconditionErrorException

      Precondition Error

      at liquibase.precondition.core.IndexExistsPrecondition.check()
    2. Liquibase Core
      Liquibase.update
      1. liquibase.precondition.core.IndexExistsPrecondition.check(IndexExistsPrecondition.java:111)
      2. liquibase.precondition.core.NotPrecondition.check(NotPrecondition.java:30)
      3. liquibase.precondition.core.AndPrecondition.check(AndPrecondition.java:34)
      4. liquibase.precondition.core.PreconditionContainer.check(PreconditionContainer.java:199)
      5. liquibase.changelog.ChangeSet.execute(ChangeSet.java:274)
      6. liquibase.changelog.visitor.UpdateVisitor.visit(UpdateVisitor.java:28)
      7. liquibase.changelog.ChangeLogIterator.run(ChangeLogIterator.java:58)
      8. liquibase.Liquibase.update(Liquibase.java:135)
      8 frames
    3. org.liquibase.maven
      AbstractLiquibaseMojo.execute
      1. org.liquibase.maven.plugins.LiquibaseUpdate.doUpdate(LiquibaseUpdate.java:31)
      2. org.liquibase.maven.plugins.AbstractLiquibaseUpdateMojo.performLiquibaseTask(AbstractLiquibaseUpdateMojo.java:24)
      3. org.liquibase.maven.plugins.AbstractLiquibaseMojo.execute(AbstractLiquibaseMojo.java:375)
      3 frames
    4. Maven Plugin
      DefaultBuildPluginManager.executeMojo
      1. org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
      1 frame
    5. Maven Core
      DefaultMaven.execute
      1. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
      2. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      3. org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      4. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
      5. org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
      6. org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
      7. org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
      8. org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
      9. org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
      9 frames
    6. M3 Interceptor
      MavenCli.main
      1. org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
      2. org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
      3. org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
      3 frames
    7. 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
    8. Plexus
      Launcher.main
      1. org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
      2. org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
      3. org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
      4. org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
      4 frames