Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

[Tomcat] Liquibase failed to start

$
0
0
Hi there.

I've app project on spring-boot generated by JHipster along with Liquibase 3.4.2. Application works fine if launched by java -jar command but fails to start on tomcat server.

Stacktrace (full in attachment):
  1. SEVERE 10.08.16 17:46: liquibase: Cannot build ServiceLocator
    java.lang.NullPointerException
        at liquibase.resource.AbstractResourceAccessor.addRootPath(AbstractResourceAccessor.java:46)
        at liquibase.resource.AbstractResourceAccessor.init(AbstractResourceAccessor.java:33)
        at liquibase.resource.ClassLoaderResourceAccessor.<init>(ClassLoaderResourceAccessor.java:21)
        at liquibase.servicelocator.ServiceLocator.<init>(ServiceLocator.java:49)
        at liquibase.servicelocator.ServiceLocator.<clinit>(ServiceLocator.java:33)

After some investigation I've found this code in AbstractResourceAccessor:

  1. baseUrls = classLoader.getResources("");

Classloader instance provided by org.apache.catalina.loader.WebappClassLoader. It returns some enumeration with null in the end. So when liquibase execute further code: 

  1.     protected void addRootPath(URL path) {
            String externalForm = path.toExternalForm();

It fails with null pointer exception. How it's even possible? It's fault of tomcat, liquibase or my config? Please help to resolve this sutiation.


Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>