Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relative Path error when using the includeAll tag and Springboot #1657

Closed
mbohls opened this issue Jan 27, 2021 · 5 comments · Fixed by #1665
Closed

Relative Path error when using the includeAll tag and Springboot #1657

mbohls opened this issue Jan 27, 2021 · 5 comments · Fixed by #1665

Comments

@mbohls
Copy link

mbohls commented Jan 27, 2021

Environment

Liquibase Version: v4.1.1 and v4.2.2 (it was working in 4.0.0 and 4.1.0)

Liquibase Integration & Version: SpringBoot 2.3.1

Liquibase Extension(s) & Version: none

Database Vendor & Version: MariaDB

Operating System Type & Version: Windows

Description

Use of the includeAll tag results in "error parsing classpath". The same configuration works with LB v4.0.0 and v4.1.0.

Steps To Reproduce

Use these changelogs:

db.changelog-1.0.0.yaml.txt
db.changelog-master.yaml.txt
db.changelog-0.0.0.yaml.txt

Actual Behavior

The "liquibase update" command errors.

Caused by: liquibase.exception.ChangeLogParseException: Error parsing classpath:/db/changelog/db.changelog-master.yaml at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:88) ~[liquibase-core-4.2.2.jar:na] at liquibase.Liquibase.getDatabaseChangeLog(Liquibase.java:337) ~[liquibase-core-4.2.2.jar:na] at liquibase.Liquibase.lambda$update$1(Liquibase.java:229) ~[liquibase-core-4.2.2.jar:na] at liquibase.Scope.lambda$child$0(Scope.java:160) ~[liquibase-core-4.2.2.jar:na] at liquibase.Scope.child(Scope.java:169) ~[liquibase-core-4.2.2.jar:na] at liquibase.Scope.child(Scope.java:159) ~[liquibase-core-4.2.2.jar:na] at liquibase.Scope.child(Scope.java:138) ~[liquibase-core-4.2.2.jar:na] at liquibase.Liquibase.runInScope(Liquibase.java:2277) ~[liquibase-core-4.2.2.jar:na] at liquibase.Liquibase.update(Liquibase.java:215) ~[liquibase-core-4.2.2.jar:na] at liquibase.Liquibase.update(Liquibase.java:201) ~[liquibase-core-4.2.2.jar:na] at liquibase.integration.spring.SpringLiquibase.performUpdate(SpringLiquibase.java:321) ~[liquibase-core-4.2.2.jar:na] at liquibase.integration.spring.SpringLiquibase.afterPropertiesSet(SpringLiquibase.java:269) ~[liquibase-core-4.2.2.jar:na] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1855) ~[spring-beans-5.2.7.RELEASE.jar:5.2.7.RELEASE] at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1792) ~[spring-beans-5.2.7.RELEASE.jar:5.2.7.RELEASE] ... 24 common frames omitted Caused by: liquibase.exception.SetupException: Error parsing /db/changelog/db.changelog-0.0.0.yaml at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:373) ~[liquibase-core-4.2.2.jar:na] at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:320) ~[liquibase-core-4.2.2.jar:na] at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:82) ~[liquibase-core-4.2.2.jar:na] ... 37 common frames omitted Caused by: liquibase.exception.ChangeLogParseException: Error parsing /db/changelog/db.changelog-0.0.0.yaml at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:88) ~[liquibase-core-4.2.2.jar:na] at liquibase.changelog.DatabaseChangeLog.include(DatabaseChangeLog.java:586) ~[liquibase-core-4.2.2.jar:na] at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:365) ~[liquibase-core-4.2.2.jar:na] ... 39 common frames omitted Caused by: liquibase.exception.SetupException: The file file:/C:/dev/repos/pas-audit-groups/target/classes/db/changelog/changes/v0/0300-createTable-Appointment.xml was not found in ... Specifying files by absolute path was removed in Liquibase 4.0. Please use a relative path or add '/' to the classpath parameter. at liquibase.changelog.DatabaseChangeLog.includeAll(DatabaseChangeLog.java:547) ~[liquibase-core-4.2.2.jar:na] at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:414) ~[liquibase-core-4.2.2.jar:na] at liquibase.changelog.DatabaseChangeLog.load(DatabaseChangeLog.java:320) ~[liquibase-core-4.2.2.jar:na] at liquibase.parser.core.yaml.YamlChangeLogParser.parse(YamlChangeLogParser.java:82) ~[liquibase-core-4.2.2.jar:na]

Expected/Desired Behavior

The "liquibase update" command should be successful when using includeAll in the changelogs.

Screenshots (if appropriate)

If applicable, add screenshots to help explain your problem.

Additional Context

Add any other context about the problem here.

@molivasdat
Copy link
Contributor

#1595 may be related or the same issue.

@nvoxland
Copy link
Contributor

nvoxland commented Feb 3, 2021

PR #1664 should fix this.

@molivasdat molivasdat linked a pull request Feb 4, 2021 that will close this issue
@sync-by-unito
Copy link

sync-by-unito bot commented Feb 9, 2021

➤ Wesley Willard commented:

Looks good

@sync-by-unito
Copy link

sync-by-unito bot commented Feb 10, 2021

➤ Nargiz Huss commented:

Liquibase Version: 4.1.1 and 4.2.2
Liquibase Integration & Version: SpringBoot 2.3.1

I was able to replicate the issue using xml and yml files.
Fix works in 4.3.0-LB-714-SNAPSHOT
For negative testing in my master changelog file I've added an emptyFolder directory that doesn't include anything and it failed. Works as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants