Axon 4.5.16, Spring Boot 3.2.2 and Java 21, the application does not start

After upgrading Spring Boot to version 3.2.2, our application fails to start, throwing the following error message:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'onderzoekRepository': Failed to instantiate [org.axonframework.modelling.command.Repository]: Factory method 'repository' threw exception with message: Default configuration requires the use of event sourcing. Either configure an Event Store to use, or configure a specific repository implementation for class (our aggregate object).

The application functions properly with Spring Boot version 3.2.1. Notably, in Spring Boot 3.2.2, the Spring Data version has been updated to 2023.1

Hi Parsa,

we’ve noticed there is a slight difference in Spring Boot 3.2.2 in the way AutoConfiguration classes are loaded. This unfortunately causes Axon’s JPA related autoconfiguration to kick in just before Spring does its part of JPA initialization. This causes certain beans to be unavailable, and Axon’s JPA autoconfiguration to be skipped.

We’re working on a fix that will be part of Axon Framework 4.9.2.