Migration to axon 4.8.0

I have a spring boot application with the version 2.7.13, when i migrate to axon 4.8.0, i have the below error

    <dependency>
        <groupId>org.axonframework</groupId>
        <artifactId>axon-spring-boot-starter</artifactId>
        <version>4.8.0</version>
    </dependency>
    <dependency>
        <groupId>org.axonframework.extensions.reactor</groupId>
        <artifactId>axon-reactor-spring-boot-starter</artifactId>
        <version>4.8.0</version>
    </dependency>
    <dependency>
        <groupId>org.axonframework.extensions.mongo</groupId>
        <artifactId>axon-mongo-spring-boot-starter</artifactId>
        <version>4.8.0</version>
    </dependency>
An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.axonframework.extensions.mongo.springboot.autoconfig.MongoDeadLetterProviderAutoConfiguration.registerDeadLetterProvider(MongoDeadLetterProviderAutoConfiguration.java:60)

The following method did not exist:

    'org.axonframework.config.EventProcessingConfigurer org.axonframework.config.EventProcessingModule.registerDeadLetterQueueProvider(java.util.function.Function)'

The calling method's class, org.axonframework.extensions.mongo.springboot.autoconfig.MongoDeadLetterProviderAutoConfiguration, was loaded from the following location:

    jar:file:/C:/Users/.m2/repository/org/axonframework/extensions/mongo/axon-mongo-spring-boot-autoconfigure/4.8.0/axon-mongo-spring-boot-autoconfigure-4.8.0.jar!/org/axonframework/extensions/mongo/springboot/autoconfig/MongoDeadLetterProviderAutoConfiguration.class

The called method's class, org.axonframework.config.EventProcessingModule, is available from the following locations:

    jar:file:/C:/Users/.m2/repository/org/axonframework/axon-configuration/4.7.3/axon-configuration-4.7.3.jar!/org/axonframework/config/EventProcessingModule.class

The called method's class hierarchy was loaded from the following locations:

    org.axonframework.config.EventProcessingModule: file:/C:/Users/.m2/repository/org/axonframework/axon-configuration/4.7.3/axon-configuration-4.7.3.jar


Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.axonframework.extensions.mongo.springboot.autoconfig.MongoDeadLetterProviderAutoConfiguration and org.axonframework.config.EventProcessingModule

Hi Aymen,

The core axon framework consists of multiple modules. It seems for the axon-configuration module, you don’t have the 4.8.0 version. In order to mange axon version more easily we offer a bom, this way you can easily upgrade all the modules and extensions by updating a single version.

So, in order to fix it,you could add this dependency:

<dependency>
    <groupId>org.axonframework</groupId>
    <artifactId>axon-configuration</artifactId>
    <version>4.8.0</version>
</dependency>

Or you can move to use the bom, in which case you should be able to leave out the versions of the artifacts you listed. Please note you will still need the dependencies themselves, as all the bom is doing is providing a certain version, if the dependency is used.

I’m not sure why it’s not using the 4.8.0 version of axon-configuration yet. Probably it’s included with a different version, or the bom is used, but not with the 4.8.0 version.

1 Like