Hi, thanks for yous answer, this was actually more a (wrong) reporting post about Liquibase not being easy to setup in a Docker/Spring environment. I posted the actual “help requests” on Stack Overflow and here in Liquibase Developement (not even sure it was the right place to do, but seemed the best).
While it being a bit complex (I’m still having trouble with version mismatching between dependencies) the problem I was having was not related to liquibase (I thought it was because only when using liquibase it was rising, but it wasn’t).
Basically, I had a postgres installed on my local machine and one in my docker system: when using mvn liquibase:diff it was trying to connect to the one on my local machine and not the one in docker (they were listening on the same port).
Since we’re at it, can you help me with this ?
I’m having incompatibility problems between liquibase and other dependencies. This is what I get when using mvn liquibase:diff
[WARNING] HHH000505: Ignoring ServiceConfigurationError caught while trying to instantiate service 'interface org.hibernate.boot.model.FunctionContributor'.
java.util.ServiceConfigurationError: org.hibernate.boot.model.FunctionContributor: org.hibernate.envers.boot.internal.FunctionContributorImpl not a subtype
[WARNING] HHH000505: Ignoring ServiceConfigurationError caught while trying to instantiate service 'interface org.hibernate.boot.spi.AdditionalMappingContributor'.
java.util.ServiceConfigurationError: org.hibernate.boot.spi.AdditionalMappingContributor: org.hibernate.envers.boot.internal.AdditionalMappingContributorImpl not a subtype
[WARNING] HHH000505: Ignoring ServiceConfigurationError caught while trying to instantiate service 'interface org.hibernate.boot.model.TypeContributor'.
java.util.ServiceConfigurationError: org.hibernate.boot.model.TypeContributor: org.hibernate.envers.boot.internal.TypeContributorImpl not a subtype
[WARNING] HHH000505: Ignoring ServiceConfigurationError caught while trying to instantiate service 'interface org.hibernate.service.spi.ServiceContributor'.
java.util.ServiceConfigurationError: org.hibernate.service.spi.ServiceContributor: org.hibernate.envers.boot.internal.EnversServiceContributor not a subtype
[WARNING] HHH000505: Ignoring ServiceConfigurationError caught while trying to instantiate service 'interface org.hibernate.boot.registry.selector.StrategyRegistrationProvider'.
java.util.ServiceConfigurationError: org.hibernate.boot.registry.selector.StrategyRegistrationProvider: org.hibernate.envers.boot.internal.AuditStrategyRegistrationProvider not a subtype
[WARNING] HHH000505: Ignoring ServiceConfigurationError caught while trying to instantiate service 'interface org.hibernate.boot.registry.selector.StrategyRegistrationProvider'.
java.util.ServiceConfigurationError: org.hibernate.boot.registry.selector.StrategyRegistrationProvider: org.hibernate.envers.boot.internal.ModifiedColumnNamingStrategyRegistrationProvider not a subtype
[WARNING] HHH000505: Ignoring ServiceConfigurationError caught while trying to instantiate service 'interface org.hibernate.integrator.spi.Integrator'.
java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: org.hibernate.envers.boot.internal.EnversIntegrator not a subtype
This is my pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>3.5.0</version>
<relativePath/>
</parent>
<groupId>com.starcrest</groupId>
<artifactId>backend-primary</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>backend-primary</name>
<description>Main backend for Starcrest central server</description>
<properties>
<java.version>21</java.version>
<hibernate.version>6.2.7.Final</hibernate.version>
</properties>
<dependencies>
<!-- SPRING -->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
<exclusions>
<exclusion>
<groupId>org.hibernate.orm</groupId>
<artifactId>hibernate-envers</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<!-- KAFKA -->
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>
<!-- LOMBOK -->
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<optional>true</optional>
</dependency>
<!-- POSTGRES -->
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<scope>runtime</scope>
</dependency>
<!-- SECURITY -->
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-crypto</artifactId>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-api</artifactId>
<version>0.12.6</version>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-impl</artifactId>
<version>0.12.6</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt-jackson</artifactId>
<version>0.12.6</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.github.vladimir-bukhtoyarov</groupId>
<artifactId>bucket4j-core</artifactId>
<version>7.6.0</version>
</dependency>
<!-- GSON -->
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.10.1</version>
</dependency>
<!-- LIQUIBASE -->
<dependency>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-core</artifactId>
<version>4.27.0</version>
</dependency>
<dependency>
<groupId>org.liquibase.ext</groupId>
<artifactId>liquibase-hibernate6</artifactId>
<version>4.27.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<annotationProcessorPaths>
<path>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
</path>
<path>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
</path>
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-XX:+EnableDynamicAgentLoading</argLine>
</configuration>
</plugin>
<!-- LIQUIBASE -->
<plugin>
<groupId>org.liquibase</groupId>
<artifactId>liquibase-maven-plugin</artifactId>
<version>4.27.0</version>
<configuration>
<propertyFile>src/main/resources/liquibase.properties</propertyFile>
<referenceUrl>hibernate:spring:com.starcrest.backend_primary.entity?dialect=org.hibernate.dialect.PostgreSQLDialect</referenceUrl>
<changeLogFile>src/main/resources/database/changelog/db.changelog-master.yaml</changeLogFile>
</configuration>
</plugin>
</plugins>
</build>
</project>