Liquibase 4.0 problem when starting with jar
See original GitHub issueEnvironment
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:
- Created 3 years ago
- Reactions:18
- Comments:28 (7 by maintainers)
Top GitHub Comments
We would appreciate if this bug could be fixed asap! Let us know if we can somehow help
Still reproduces on 4.1.0 version