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.

Hy Allard,
is there an update on the problem?
I have the same issue as Parsa and I am completly new to axon and cqrs and already I put a lot of hours in an spring, and axon project and it did not work out.

I also tried using axon version 4.9.2, 4.9.3, 4.9.4 but I sill got the same error with the Failed Initialization.

Hi,

the notification of your reply somehow got lost in my inbox.

Can you share the stackstraces/errors that you’re currently seeing? As far as we can tell, Axon currently works fine with any recent version of Spring Boot.