How to solve this error?
Specifying files by absolute path was removed in Liquibase 4.0. Please use a relative path or add '/' to the classpath parameter.
Suppose I don't have the liquibase installed. I just want to run my Spring project connected to postgres from maven/gradle/eclipse and I'm getting this error from all.
My maven configuration is using liquibase 4.9.1
I'm trying to use
db/changelog/db.changelog-master.xml
In My pom.xml I have
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<configuration>
<propertyFile>/src/main/resources/liquibase.properties</propertyFile>
<changeLogFile>/db/changelog/db.changelog-master.xml</changeLogFile>
</configuration>
</plugin>
What should I type in
cat src\main\resources\liquibase.properties
for classpath?
classpath:/db/changelog/db.changelog-master.xml
from eclipse I get
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 parsing classpath:/db/changelog/db.changelog-master.yaml
..
Caused by: liquibase.exception.ChangeLogParseException:
Error parsing classpath:/db/changelog/db.changelog-master.yaml
..
Caused by: liquibase.exception.SetupException:
The file db/changelog-base.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.
..
Caused by: liquibase.exception.ChangeLogParseException:
The file db/changelog-base.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.
Could you please help me?
UPDATE: It worked from maven when I updated the changeLogFile value.
$ mvn liquibase:update
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<configuration>
<propertyFile>/src/main/resources/liquibase.properties</propertyFile>
<changeLogFile>/src/main/resources/db/changelog/db.changelog-master.xml</changeLogFile>
</configuration>
</plugin>
But how to run liquibase from eclipse, Java Spring boot project, I Run as java Application? Basically I have a spring project that successfully run from eclipse, now with this liquibase configuration my application fails. using
spring.liquibase.change-log=classpath:db/changelog/db.changelog-master.xml
in My application.properties