整合rocketmq/stream-rocketmq启动报错channel.AbstractMessageChannel问题
springboot整合rocketmq/stream-rocketmq启动报错
spring boot、springcloud、springcloud alibaba项目整合rocketmq时。一启动就报错:
Correct the classpath of your application so that it contains a single, compatible version of org.springframework.integration.channel.AbstractMessageChannel
项目pom依赖使用的是:
<!--RocketMQ --><dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-stream-rocketmq</artifactId></dependency>
版本是:5.3.0.RELEASE
报错信息:
一启动项目就报错:
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.classIt 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.jarAction:Correct the classpath of your application so that it contains a single, compatible version of org.springframework.integration.channel.AbstractMessageChannel
图示:
问题排查:
由报错信息可知是spring-integration-core-5.3.0.RELEASE.jar 的问题
点进源码中,查看AbstractMessageChannel类发现没有getchannelInterceptors方法,且在RocketMQMessageChannelBinder.java:172行,出现报错:
官网查了半天:
https://github.com/alibaba/spring-cloud-alibaba/pull/1503
大概意思就是spring-cloud-starter-stream-rocketmq中自带的spring-integration-core版本过高改版,不适用。
解决方案:
因为一个spring-integration-core版本,就去更改MQ版本太容易出错,所以不采取。之前的版本中spring-integration-core版本为5.2.1是可以用的,所以我们剔除封装好的高版本,改为自定义版本搭配。
更改pom如下:
<!--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>
剔除原来自带的5.3.0以上版本,使用5.2.1版本。
启动项目正常:
查看RocketMQMessageChannelBinder 172行已经不报红了。
整合rocketmq/stream-rocketmq启动报错channel.AbstractMessageChannel问题相关推荐
- RocketMQ集群启动报错:java.lang.RuntimeException: Lock failed,MQ already started
启动RocketMQ集群后报错: java.lang.RuntimeException: Lock failed,MQ already startedat org.apache.rocketmq.st ...
- 解决高版本SpringBoot整合swagger时启动报错:Failed to start bean ‘documentationPluginsBootstrapper‘ 问题
一.控制台的报错信息 2021-12-29 15:15:04 [main] ERROR org.springframework.boot.SpringApplication - Application ...
- SpringCloud - 整合Nacos启动报错Consider defining a bean of type IClientConfig
SpringCloud - 整合Nacos启动报错Consider defining a bean of type IClientConfig 前言 一. 尝试解决Bug的几种不合适方案 1.1 添加 ...
- SpringBoot整合minio启动报错无法访问okhttp3.HttpUrl
问题: 项目启动报错: 无法访问okhttp3.HttpUrl 找不到okhttp3.HttpUrl的类文件 原因我猜应该是docekr pull下来的minio版本高了.因为几个月前我搞的时候还没有 ...
- 【Spring Cloud Alibaba】(五)Dubbo启动报错?一直重连报错?你值得学习的是排查问题的方法
系列目录 [Spring Cloud Alibaba](一)微服务介绍 及 Nacos注册中心实战 [Spring Cloud Alibaba](二)微服务调用组件Feign原理+实战 [Spring ...
- httpd启动报错:httpd: apr_sockaddr_info_get() failed for jsp...
httpd启动报错:httpd: apr_sockaddr_info_get() failed for jsp... 今天在搭建Apache+tomcat整合环境的时候,遇到httpd启动报错这种情况 ...
- tomcat启动报错,找不到相应的 queue,从而引发内存泄漏
tomcat启动报错,无法创建 bean listenerStatusChangeDealHandler, no queue 'STOCK.NOTIFY_CHANGE.INTER.CACHE.QUEU ...
- tomcat启动报错,找不到对应的 queue,从而引发内存泄漏
tomcat启动报错,无法创建 bean listenerStatusChangeDealHandler, no queue 'STOCK.NOTIFY_CHANGE.INTER.CACHE.QUEU ...
- IDEA2021启动报错Your JRE: 11.0.10+9-b1341.41 amd64 (JetBrains s.r.o.)\jbr libpng warning: iCCP: cHRM
IDEA2021启动失败问题 Internal error. Please refer to https://jb.gg/ide/critical-startup-errors 这个问题大部分情况下是 ...
最新文章
- Android Studio 第一次配置及其使用
- 关于程序员之间丧心病狂的鄙视链——编程语言篇
- 未来耳机可能将成为最强大的健康监护仪
- cherry-pick,revert和rebase使用的3-way合并策略
- 解构电商产品——订单系统(一)
- 笨办法学python47详解_练习 47 - 自动化测试 - 笨办法学Python3
- 苹果手机投屏软件_苹果手机怎样投屏到电脑上操作,用什么软件?
- 如何进行I/O评估、监控、定位和优化?
- linq绑定下拉列表,combobox中增加listitem的方法,增加“请选择”
- mongoose populate 返回 指定 字段
- 怎么去除表中的系统导出的字符_EXCEL非常有用的字符函数LEN、LENB,财务工作者的必备利器...
- hdfs中Exception in createBlockOutputStream以及MapReduce中I/O error constructing remote block reader
- 线性规划与多目标规划
- java ftp 断点,java实现ftp断点续传
- Java进程与子进程交互
- Atitit 提升记忆效率 有损压缩原理总结 目录 1. 常见方法	1 1.1. 抽象化提升一层 概念化	1 1.2. 骨架 ,目录化 大纲化 归纳整理	1 1.3. 提取关键词 ,摘要 ,
- 最新最简单的黑苹果Mac Windows双系统教程(单双系统通用)
- LVDS的接口电路设计
- SAE使用以及GPS 的经纬度换算成距离的代码(转载)
- 小米8探索版线刷兼救砖_解账户锁_纯净刷机包_教程
热门文章
- android+通过菜单跳转页面,【风马一族_Android】通过菜单的点击,跳转到不同界面...
- minigui 的中文字体部署及支持窗口模态、非模态
- 微带滤波器摘要_微带交指滤波器的设计
- Windows和Linux双系统时间误差8小时解决方案
- 领存Xeon E5 6U VPX高性能计算刀片上市
- html5学习笔记之十(微数据)
- cephfs:1 clients failing to respond to cache pressure原因分析
- 项目经理等级划分,看看你在哪一级?
- notepad++安装NPPJSONViewer插件教程
- 经历过CMMI后的体会和总结,为什么别人的时间总是比你的值钱