-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
From Version 4.3.2 on change-log file is found twice in classpath #1916
Comments
Hi @MichaelZett Thanks for opening this issue. We will add it to the list of issues that are being processed. |
I've faced a similar issue, are there any updates regarding it? |
@MichaelMyronenko We will take a look again. |
@molivasdat The reason was this line in my bootRun task configuration: |
We have been working to improve the way we find files, as well as how it handles unexpected situations. The above behavior is the expected behavior based on your configuration. By default, gradle and maven should be including your build output/target directory by default in the locations to search for changelog files, and so if you are also specifying that liquibase should look in your sources directory, it's seeing two copies of the changelog files and throwing the (expected) error saying that it's found the file in two separate locations. The build output is the better one to use, since then if you have any compile-time transformations or whatever it will pick that up like any other "built" code. Removing whatever configuration you have that also includes |
@MichaelMyronenko Thank you! We had the same configuration in our bootRun-task. After removing it, app starts again in intellij wit the current liquibase version. |
We are running into a similar issues when running liquibase unit tests using gradle 7 and liquibase 4.9.1. Replaced our project/module name with "test-project" in the stacktrace below: Now when we run the unit tests with Lqiuibase 4.9.1, we get the following error:
The changelog.xml files is on the classpath from the test-project src and also from the test-project jar itself. This used to work fine in the 3.x version of liquibase. We are a bit late to migrate to 4.x, so we had to jump from the last 3.x version to the latest 4.x version. I see @MichaelMyronenko made some changes in the spring-boot config to fix the issue. Has someone ran into this issue with just using just spring 5.x and gradle 7.x? Any ideas how can we fix this in our project. Thanks !! |
spinnaker/kork#937 (comment) (and specifically https://github.com/spinnaker/kork/runs/5472596514?check_suite_focus=true) is I think another instance where this happens. That's using gradle 6.8.1, spring boot 2.2.13 and spring 5.2.12 with liquibase 4.8.0. It also happens with spring boot 2.3.12 / spring 5.2.15.
Things are fine with liquibase 3.8.9 and 3.10.3, but break with 4.0.0 and 4.1.0. Perhaps curiously, they work again with 4.1.1, 4.2.0, 4.2.1, 4.2.2, 4.3.0, and 4.3.1, and then break with 4.3.2, 4.3.3, 4.3.4, 4.3.5, 4.4.0, 4.4.1, 4.4.2, 4.4.3, 4.5.0, 4.6.0, 4.6.1, 4.6.2, 4.7.0, 4.7.1, 4.8.0, 4.9.0, and 4.9.1. Using 4.9.1, the stack trace is:
|
In case it helps, I have the same behavior with versions 4.3.1 and 4.3.0 which are called out as safe above. |
file- master-changlog.yaml databaseChangeLog:
|
I had same issue any possible solution for below ?
Please help me you find any solution. |
Environment
Liquibase Version: 4.3.2+
Liquibase Integration & Version: gradle 6.8.3, spring boot 2.5.x
Liquibase Extension(s) & Version:
Database Vendor & Version: PostgresQl and H2
Operating System Type & Version: MacOs
Description
After upgrading our spring boot multi-module-gradle-projects from 2.4.7 to 2.5.1 we encountered the issue that the app does not start anymore in IntelliJ with the following error:
"Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'liquibase' defined in class path resource [org/springframework/boot/autoconfigure/liquibase/LiquibaseAutoConfiguration$LiquibaseConfiguration.class]: Invocation of init method failed; nested exception is liquibase.exception.ChangeLogParseException: Error Reading Changelog File: Found 2 files that match classpath:/liquibase/db.changelog-master.xml: file:/Users/[...]/src/main/resources/liquibase/db.changelog-master.xml, file:/Users/[...]/build/resources/main/liquibase/db.changelog-master.xml"
Building and starting the jar with gradle still works.
spring.liquibase.change-log: classpath:/liquibase/db.changelog-master.xml is configured in application.yaml
After downgrading to liquibase 4.3.1 everything works fine.
The text was updated successfully, but these errors were encountered: