So far it would work with 7.16 scripts, but with 7.17 the first update is inside the camunda-changelog.xml and liquibase can not resolve the relative path.
Error message:
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.LiquibaseException: liquibase.exception.UnexpectedLiquibaseException:
java.io.IOException: The file ../upgrade/h2_engine_7.16_to_7.17.sql was not found in
- Spring resources
Specifying files by absolute path was removed in Liquibase 4.0. Please use a relative path or add '/' to the classpath parameter.
Is there a right approach to implement the camunda-changelog.xml?
Unfortunately liquibase can’t load the relative paths with parent directory navigation from the jar. While it’s probably a bug in liquibase itself we already have a bug ticket to fix this in our changelog file.
Until it’s not fixed you can only solve it with workarounds. One would be to copy the camunda db files from the jar into the resources of your project and include a link to that camunda-changelog.xml.
When application starts, migration fails because of existing tables from engine. It means that the change location does not apply spring.liquibase.change-log: classpath:changelog/db.changelog-master.xml to engines changelog. How did you solve this issue if you had it?
Thank you
sorry for the late reply. No we didn’t solved it. We added create and update files referencing the Camunda files. In this way you still need du check if updates have scripts.
Please check if Camunda 7.18, 7.17.3, 7.16.10 or 7.18.0-alpha3 have any changes, since this are mentioned as fix versions in the bug ticket.
Hi @JanvN
Thank you for your response. Problem with relative path is solved in version 7.18, but my issue now is that engine starts before liquibase executes scripts and consequently engine fails because it cannot find tables needed.
With camunda.bpm.database.schema-update: false and having the same master changelog as yours.
I am wondering if you had the same issue? What I need to do is to execute liquibase files before engine starts.