关于RocketMQMessageChannelBinder.java:172报错method that does not exist

关于RocketMQMessageChannelBinder.java:172报错method that does not exist

背景
为了适配nacos1.3.2,springcloudHoxton.RELEASE升级到Hoxton.SR7com.alibaba.cloud****2.2.0升级到2.2.1

问题描述:
错误信息如下:

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:/xzb/5_course/xzb-course.jar!/BOOT-INF/lib/spring-integration-core-5.3.2.RELEASE.jar!/org/springframework/integration/channel/AbstractMessageChannel.class

The class hierarchy was loaded from the following locations:

    org.springframework.integration.channel.AbstractMessageChannel: jar:file:/xzb/5_course/xzb-course.jar!/BOOT-INF/lib/spring-integration-core-5.3.2.RELEASE.jar!/
    org.springframework.integration.context.IntegrationObjectSupport: jar:file:/xzb/5_course/xzb-course.jar!/BOOT-INF/lib/spring-integration-core-5.3.2.RELEASE.jar!/


Action:

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

问题分析
pom如下(未更改):
在这里插入图片描述

错误信息可知getChannelInterceptors()报错:
在这里插入图片描述
可知由于spring-integration-core-5.3.2.RELEASE.jar报错导致:
在这里插入图片描述
官网找一下:
https://github.com/alibaba/spring-cloud-alibaba/pull/1503(无奈)
在这里插入图片描述
问题解决:
由于轻易更改版本太容易出错了,那我们干脆换回来呗,查看下之前的版本中spring-integration-core版本为5.2.1:
更改pom:
在这里插入图片描述
查看RocketMQMessageChannelBinder 173行已经不报红了。

建议:轻易别换版本尤其是使用 com.alibaba.cloud,如果业务需要确实需要比如我这次的nacos的权限问题,建议多去官网看下。
转载注明出处,谢谢。

评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值