mongock / mongock

Lightweight Java based migration tool

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

No ConnectionDriver with Spring Boot 3.0

hstaudacher opened this issue · comments

Description

I just upgrade our application to Spring Boot 3.0. I'm using Mongock 5.2.1. With Spring Boot 2.7 the application started without a problem. After updating we are seeing the following error:

***************************
APPLICATION FAILED TO START
***************************

Description:

Parameter 0 of method getBuilder in io.mongock.runner.springboot.config.MongockContext required a bean of type 'io.mongock.driver.api.driver.ConnectionDriver' that could not be found.


Action:

Consider defining a bean of type 'io.mongock.driver.api.driver.ConnectionDriver' in your configuration.

PRIORITY

CRITICAL

Version and environment

Mongock

  • Mongock version: 5.2.1
  • Modules involved: Spring Boot 3.0
  • How Mongock is used: Annotation

Environment

  • Spring Boot 3.0
  • Infrastructure: local development

Steps to Reproduce

  1. Setup a spring boot 3.0 application. Setup MongoDB and configure Mongock
  2. Start the application

Behaviour

Expected behavior: Application should start.

Actual behavior: Application does not start.

How often the bug happens: Everytime

Link to repository using Mongock

[While not mandatory, accessing to the real code that uses Mongock, would help to solve the issue]

Additional context

[Any additional information, logs, screenshots, configuration or data that might be necessary to reproduce or understand the issue]

Hello @hstaudacher , for Springboot 3 we provide specifics modules because it requires JDK17+. Are you using them?

<dependency>
    <groupId>io.mongock</groupId>
    <artifactId>mongock-springboot-v3</artifactId>
</dependency>

<!-- if you are using spring data v4 -->
<dependency>
    <groupId>io.mongock</groupId>
    <artifactId>mongodb-springdata-v4-driver</artifactId>
</dependency>

Thanks so much. This fixed the problem. Is the spring boot 3 support documented somewhere? I wasn't able to find it.

Not yet, sorry. It was an urgent update required by JHipster team. We'll document it as soon as possible. Thanks.

Alright, no worries. At least people can find this issue now :). Thanks again!