Is Zonky embedded database supported for Spring boot 3.0 version?

1.8k Views Asked by At

I am trying to migrate my application from spring boot 2.7.2 to 3.0.0 version. On running integration test case, I am getting below error :

java.lang.NullPointerException: Cannot invoke "org.hibernate.metamodel.mapping.JdbcMapping.getJdbcValueBinder()" because "jdbcMapping" is null

Hibernate ORM core version is 6.1.5.Final.

Could someone please guide if they have used zonky libraries with spring boot 3.0 ?

I have added below dependencies in pom.xml :

<dependency>
    <groupId>io.zonky.test</groupId>
    <artifactId>embedded-database-spring-test</artifactId>
    <version>2.2.0</version>
    <scope>test</scope>
</dependency>
<dependency>
    <groupId>io.zonky.test</groupId>
    <artifactId>embedded-postgres</artifactId>
    <version>2.0.2</version>
    <scope>test</scope>
</dependency>
1

There are 1 best solutions below

0
On

In case the test class uses a spring context that already contains a data source bean, the data source bean will be automatically replaced with a testing data source. The newly created data source bean will be injected into all related components, and you can also inject it into a test class.