Home:ALL Converter>Liquibase cannot find changelog file

Liquibase cannot find changelog file

Ask Time:2019-10-16T00:15:41         Author:Aligator

Json Formatter

I have following error with our spring boot 2 application:

Caused by: liquibase.exception.ChangeLogParseException: Error Reading Migration File: class path resource [src/main/resources/changelogs/changelog-1.0.xml] cannot be resolved to URL because it does not exist at liquibase.parser.core.xml.XMLChangeLogSAXParser.parseToNode(XMLChangeLogSAXParser.java:118) at liquibase.parser.core.xml.AbstractChangeLogParser.parse(AbstractChangeLogParser.java:15) at liquibase.changelog.DatabaseChangeLog.include(DatabaseChangeLog.java:525) at liquibase.changelog.DatabaseChangeLog.handleChildNode(DatabaseChangeLog.java:334) ... 190 common frames omitted

in application properties we have: spring.liquibase.change-log=classpath:/changelogs/changelog-master.xml

All scripts are structured in spring boot's resource folder /src/main/resources/changelogs

In changelogs fodler is master xml and changelog with changesets as well.

reference to changelog of changesets in master xml is like this:

<include file="src/main/resources/changelogs/changelog-1-0.xml"/>

I cannot find reason why this isn't work.

I tried relativeToChangelogFile="true" and in file use only file="changelog-1-0.xml" and this works, why ?

Author:Aligator,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/58398863/liquibase-cannot-find-changelog-file
yy