java.lang.NullPointerException

JIRA | Nick Verhelst | 2 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

    Following exception occurs when using 'includeAll' in the changelogfile, setting 'relativeToChangelogFile' to false & running liquibase from inside a jar: {code} 08:39:10,000 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/]] (ServerService Thread Pool -- 49) JBWEB000289: Servlet spring-dispatcher threw load() exception: java.lang.NullPointerException at liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.isPrefixPresent(SpringLiquibase.java:173) [liquibase-core-3.3.3.jar:] at liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.adjustClasspath(SpringLiquibase.java:169) [liquibase-core-3.3.3.jar:] at liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.list(SpringLiquibase.java:135) [liquibase-core-3.3.3.jar:] at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:316) [liquibase-core-3.3.3.jar:] {code} If we set 'relativeToChangelogFile' to true, we get: {code} 08:43:06,108 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/]] (ServerService Thread Pool -- 17) JBWEB000289: Servlet spring-dispatcher threw load() exception: java.io.FileNotFoundException: class path resource [etl/2015/04/] cannot be resolved to URL because it does not exist at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:187) [spring-core-4.1.4.RELEASE.jar:4.1.4.RELEASE] at liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.list(SpringLiquibase.java:138) [liquibase-core-3.3.3.jar:] at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:316) [liquibase-core-3.3.3.jar:] {code} In contrast, specifying the changeset-files manually by means of 'includes' in the changelog xml works correctly, so the directory/files are definitely included in the jar.

    JIRA | 2 years ago | Nick Verhelst
    java.lang.NullPointerException
  2. 0

    Following exception occurs when using 'includeAll' in the changelogfile, setting 'relativeToChangelogFile' to false & running liquibase from inside a jar: {code} 08:39:10,000 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/]] (ServerService Thread Pool -- 49) JBWEB000289: Servlet spring-dispatcher threw load() exception: java.lang.NullPointerException at liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.isPrefixPresent(SpringLiquibase.java:173) [liquibase-core-3.3.3.jar:] at liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.adjustClasspath(SpringLiquibase.java:169) [liquibase-core-3.3.3.jar:] at liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.list(SpringLiquibase.java:135) [liquibase-core-3.3.3.jar:] at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:316) [liquibase-core-3.3.3.jar:] {code} If we set 'relativeToChangelogFile' to true, we get: {code} 08:43:06,108 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/]] (ServerService Thread Pool -- 17) JBWEB000289: Servlet spring-dispatcher threw load() exception: java.io.FileNotFoundException: class path resource [etl/2015/04/] cannot be resolved to URL because it does not exist at org.springframework.core.io.ClassPathResource.getURL(ClassPathResource.java:187) [spring-core-4.1.4.RELEASE.jar:4.1.4.RELEASE] at liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.list(SpringLiquibase.java:138) [liquibase-core-3.3.3.jar:] at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:316) [liquibase-core-3.3.3.jar:] {code} In contrast, specifying the changeset-files manually by means of 'includes' in the changelog xml works correctly, so the directory/files are definitely included in the jar.

    JIRA | 2 years ago | Nick Verhelst
    java.lang.NullPointerException

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.isPrefixPresent()
    2. Liquibase Core
      DatabaseChangeLog.includeAll
      1. liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.isPrefixPresent(SpringLiquibase.java:173)[liquibase-core-3.3.3.jar:]
      2. liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.adjustClasspath(SpringLiquibase.java:169)[liquibase-core-3.3.3.jar:]
      3. liquibase.integration.spring.SpringLiquibase$SpringResourceOpener.list(SpringLiquibase.java:135)[liquibase-core-3.3.3.jar:]
      4. liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:316)[liquibase-core-3.3.3.jar:]
      4 frames