0

I've tried adding Liquibase to my project and to get the diff between entities and the database I've also added liquibase-hibernate6 to POM file.

When I try the command:

mvn liquibase:diff

I get there error:

[WARNING] HHH000181: No appropriate connection provider encountered, assuming application ...
[WARNING] HHH000342: Could not obtain connection to query metadata
java.lang.UnsupportedOperationException: The application must supply JDBC connections

This is a part of the POM file:

    <plugin>
        <groupId>org.liquibase</groupId>
        <artifactId>liquibase-maven-plugin</artifactId>
        <version>${liquibase.version}</version>
        <configuration>
            <propertyFile>src/main/resources/liquibase/config/liquibase.properties</propertyFile>
        </configuration>
        <dependencies>
            <dependency>
                <groupId>org.liquibase.ext</groupId>
                <artifactId>liquibase-hibernate6</artifactId>
                <version>4.23.1</version>
            </dependency>
        </dependencies>
    </plugin>

And the liquibase.properties

changeLogFile=src/main/resources/liquibase/liquibase-changeLog.xml
diffChangeLogFile=src/main/resources/liquibase/liquibase-changeLog.xml
outputChangeLogFile=src/main/resources/liquibase/liquibase-new-changeLog.xml
url=jdbc:postgresql://localhost:5432/forum
defaultSchemaName=public
username=postgres
password=123456
driver=org.postgresql.Driver

referenceDefaultSchemaName=public
referenceDriver=liquibase.ext.hibernate.database.connection.HibernateDriver
referenceUrl=hibernate:spring:ir.renglab.forum.domain?dialect=org.hibernate.dialect.PostgreSQLDialect

The main point is that finally it built successfully and the changelog file is created but how can I fix the error? and what is the problem?

PS: I'm using Spring-Boot version 3.1.3

Mehdi Rahimi
  • 1,453
  • 5
  • 20
  • 31

0 Answers0