Hibernate- Liquibase throwing exception : java.lang.UnsupportedOperationException: The application must supply JDBC connections

2.3k views Asked by At

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>
0

There are 0 answers