[SQL] Recursing BOM full -level, including semi -finished products, dosage, such as semi -finished product amount 2, the down order needs to be multiplied by 2

2023-03-14  

Spring Boot, SpringCloud, SpringCloud Alibaba project integrates RocketMQ. As soon as you start, you report an error:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.integration.channel.AbstractMessageChannel

Project POM dependency uses:

 <!--RocketMQ -->
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
        </dependency>

version is: 5.3.0.release

One starting project will report an error:

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    com.alibaba.cloud.stream.binder.rocketmq.RocketMQMessageChannelBinder.createProducerMessageHandler(RocketMQMessageChannelBinder.java:172)

The following method did not exist:

    org.springframework.integration.channel.AbstractMessageChannel.getChannelInterceptors()Ljava/util/List;

The method's class, org.springframework.integration.channel.AbstractMessageChannel, is available from the following locations:

    jar:file:/D:/zoutao_job/maven_repository/org/springframework/integration/spring-integration-core/5.3.0.RELEASE/spring-integration-core-5.3.0.RELEASE.jar!/org/springframework/integration/channel/AbstractMessageChannel.class

It was loaded from the following location:

    file:/D:/zoutao_job/maven_repository/org/springframework/integration/spring-integration-core/5.3.0.RELEASE/spring-integration-core-5.3.0.RELEASE.jar


Action:

Correct the classpath of your application so that it contains a single, compatible version of org.springframework.integration.channel.AbstractMessageChannel

icon:
报错地址

from the error message, it is known that it isspring-integration-core-5.3.0.RELEASE.jarproblem

Point in the source code, check the AbstractMessageChannel class and find that there is no GetChannelInterceptors method, and line at rocketMQMessageChannelBinder.java:172, an error occurs:

official website for a long time:
https://github.com/alibaba/spring-cloud-alibaba/pull/1503

问题原因
probably means that the Spring-Integration-Core version comes with Spring-Cloud-Starter-Stream-Rocketmq is too high to revise and not applicable.

Because a Spring-Integration-core version is too easy to change the MQ version, it is too easy to make an error, so it is not adopted. In the previous version, the Spring-Integration-core version is 5.2.1, so we eliminate the packaging high version and change to a custom version.

Change the pom as follows:

<!--RocketMQ -->
<dependency>
    <groupId>com.alibaba.cloud</groupId>
    <artifactId>spring-cloud-starter-stream-rocketmq</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.integration</groupId>
            <artifactId>spring-integration-core</artifactId>
        </exclusion>
    </exclusions>
</dependency>
<dependency>
    <groupId>org.springframework.integration</groupId>
    <artifactId>spring-integration-core</artifactId>
    <version>5.2.1.RELEASE</version>
</dependency>

Excluding the original version of the original 5.3.0 or above, and the version 5.2.1 is used.

Starting project is normal:启动项目
View RocketMQMESSAGECHANLBINDER 172 lines are no longer popular.

source

Related Posts

AUTOCOMPLETETEXTVIEW -Automatically complete the text box

ListView uses the getView problem NEO

Master this posture, girlfriend no longer talks about

HDU 1028 IGNATIUS and the Princess III mother function water question, everyone pays attention, I want to start the mother function ~~ lionel

[SQL] Recursing BOM full -level, including semi -finished products, dosage, such as semi -finished product amount 2, the down order needs to be multiplied by 2

Random Posts

2021 CS Baoye Experience (2): Shanda CS Summer Camp, West Power CS Summer Camp Cyril

Method of Radio, Checkbox, Select default style

Set up LAMP services (Apache, MySQL, PHP)

[RUST Tiring Notes] Rust basic grammar data type -02

Electric Vehicle AMT shifting law Study -Calculation of shifting points