question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Liquibase 4.0 problem when starting with jar

See original GitHub issue

Environment

Liquibase Version: 4.0

Liquibase Integration & Version: Spring Boot 2.3

Liquibase Extension(s) & Version: N/A

Database Vendor & Version: PostgreSQL 11

Operating System Type & Version: Windows 10

Description

An issue was reported in JHipster’s project page that my own team is encountering as well: starting up a Spring Boot fat jar that contains Liquibase fails to conduct the database schema migrations due to an issue with there not being a file system available for the Spring Boot jar.

Steps To Reproduce

  • Create a Spring Boot fat jar that cointains Liquibase version 4.0.0.
  • Launch the Spring Boot application by running java -jar /path/to/springBootApp.jar

Actual Behavior

Liquibase fails to start due to a series of errors like the one below:

java.nio.file.FileSystemNotFoundException: null
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getFileSystem(ZipFileSystemProvider.java:169)
	at jdk.zipfs/jdk.nio.zipfs.ZipFileSystemProvider.getPath(ZipFileSystemProvider.java:155)
	at java.base/java.nio.file.Path.of(Path.java:208)
	at java.base/java.nio.file.Paths.get(Paths.java:97)
	at liquibase.resource.ClassLoaderResourceAccessor.loadRootPaths(ClassLoaderResourceAccessor.java:63)

Liquibase will encounter this error for each of the files within the fat jar, e.g.

  • “jar:file:/C:/path/to/foo.jar!/BOOT-INF/classes!/”
  • “jar:file:/C:/path/to/foo.jar!/BOOT-INF/lib/foo-api.jar!/”
  • “jar:file:/C:/path/to/foo.jar!/BOOT-INF/lib/foo-domain.jar!/”

Expected/Desired Behavior

Liquibase can start up normally.

Additional Context

This looks like a relevant posting from StackExchange regarding what may be the underlying cause.

┆Issue is synchronized with this Jira Bug by Unito ┆fixVersions: Liquibase 4.1.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:18
  • Comments:28 (7 by maintainers)

github_iconTop GitHub Comments

7reactions
kruschecommented, Sep 29, 2020

We would appreciate if this bug could be fixed asap! Let us know if we can somehow help

5reactions
XSwiftercommented, Sep 29, 2020

Still reproduces on 4.1.0 version

Read more comments on GitHub >

github_iconTop Results From Across the Web

Liquibase 4.0 problem when starting with jar #1276 - GitHub
An issue was reported in JHipster's project page that my own team is encountering as well: starting up a Spring Boot fat jar...
Read more >
spring boot - Liquibase 4.0 fails to start in jar - Stack Overflow
I use Spring 2.3.3 and Liquibase 4.0.0. It works fine when run gradlew bootRun, but when I run compiled jar I get plenty...
Read more >
[Solved]-Liquibase 4.0 fails to start in jar-Springboot
Coding example for the question Liquibase 4.0 fails to start in jar-Springboot. ... From your configuration it looks like liquibase is potinting to...
Read more >
Liquibase 4.0 Extension Upgrade Guide
Learn about the impact of changes in the Liquibase 4.0 release that affect Liquibase extension ... Starting with 4.0, we switched to the...
Read more >
V4.0.0 upgrade help - General Discussion - Liquibase Forum
The problem that I'm having with 4.0.0 is that its complaining about one of our loadData scripts, ... Error setting up or running...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found