3

I am trying to generate changelog based on DB and Entity class

My Liquibase properties file is as follows

`url=jdbc:h2:mem:testdb
changeLogFile=classpath:/db/changelog/liquibase-changelog.xml
username=sa
password=password
driver=org.h2.Driver
diffChangeLogFile=src/main/resources/liquibase-outputChangeLog1.sql
referenceUrl=hibernate:spring:com.weatherApi.cityData.City?dialect=org.hibernate.dialect.H2Dialect
`

when I execute

mvn liquibase:diff

., the build is succeeded but the changelog generated is empty

it throws this error

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

I also use this dependency liquibase-hibernate5

     <dependency>
        <groupId>org.liquibase.ext</groupId>
        <artifactId>liquibase-hibernate5</artifactId>
        <version>4.0.0</version>
        <scope>runtime</scope>
    </dependency>
  • The answer on [this previous post](https://stackoverflow.com/questions/41990213/hibernate5-hhh000181-no-appropriate-connection-provider-encountered-assuming-a) may work to resolve the first error for you. However, it would be better to make separate posts for each individual error. – tabbyfoo May 10 '22 at 17:20
  • Did you solve it? If you did, could you post the solution please? – Juan May 19 '22 at 04:10
  • 1
    I found another post on the liquibase forums: https://forum.liquibase.org/t/error-when-running-diff-with-spring-boot-and-postgres/5284 says "it would always throw this error when running the diff command for generating migrations for new tables." as the accepted answer. – tabbyfoo May 19 '22 at 17:21
  • 1
    okay., I'll check out that one @tabbyfoo – Vignesh Ravichandran May 23 '22 at 13:18
  • I am also getting this error. – Flavio Oliva Sep 06 '22 at 15:36
  • Yeah, for this one, I too haven't found a solution yet – Vignesh Ravichandran Sep 08 '22 at 06:35
  • Relevant github issue for this problem: https://github.com/liquibase/liquibase-hibernate/issues/381 – Dzeri96 Feb 20 '23 at 14:40

0 Answers0