java.lang.NullPointerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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.
    via by Nick Verhelst,
  • 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.
    via by Nick Verhelst,
    • 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:]
    No Bugmate found.