gpt4 book ai didi

java - 无法启动bean 'stompBrokerRelayMessageHandler';嵌套的异常是java.lang.NoClassDefFoundError : io/netty/util/concurrent/EventExecutor

转载 作者:行者123 更新时间:2023-11-30 10:04:42 26 4
gpt4 key购买 nike

我正在使用RabbitMQ设置Springboot 2.1.4。该项目可以通过简单的代理正常运行,但是在通过RabbitMQ切换到Stomp代理中继时,应用程序启动失败,并出现以下错误。

2019-04-19 18:32:36.841信息80706 --- [main] o.s.s.concurrent.ThreadPoolTask​​Executor:关闭ExecutorService'clientOutboundChannelExecutor'
2019-04-19 18:32:36.841信息80706 --- [main] o.s.s.concurrent.ThreadPoolTask​​Executor:关闭ExecutorService'clientInboundChannelExecutor'
2019-04-19 18:32:36.845信息80706 --- [main] o.apache.catalina.core.StandardService:停止服务[Tomcat]
2019-04-19 18:32:36.860信息80706 --- [main] ConditionEvaluationReportLoggingListener:
启动ApplicationContext时出错。要显示条件报告,请在启用“调试”的情况下重新运行您的应用程序。
2019-04-19 18:32:36.871错误80706 --- [main] o.s.boot.SpringApplication:应用程序运行失败
org.springframework.context.ApplicationContextException:无法启动bean'stompBrokerRelayMessageHandler';嵌套的异常是java.lang.NoClassDefFoundError:io/netty/util/concurrent/EventExecutor
在org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:185)〜[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
在org.springframework.context.support.DefaultLifecycleProcessor.access $ 200(DefaultLifecycleProcessor.java:53)〜[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
在org.springframework.context.support.DefaultLifecycleProcessor $ LifecycleGroup.start(DefaultLifecycleProcessor.java:360)〜[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
在org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158)〜[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
在org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122)〜[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
在org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:893)〜[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
在org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163)〜[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552)〜[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
在org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)〜[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
在org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)上[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
在org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)上[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
在org.springframework.boot.SpringApplication.run(SpringApplication.java:316)上[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
在org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)上[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
在org.springframework.boot.SpringApplication.run(SpringApplication.java:1248)上[spring-boot-2.1.4.RELEASE.jar:2.1.4.RELEASE]
在com.sand.SpringWebSockets.SpringWebSocketsApplication.main(SpringWebSocketsApplication.java:10)上[classes/:na]
引起原因:java.lang.NoClassDefFoundError:io/netty/util/concurrent/EventExecutor
在org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler.initTcpClient(StompBrokerRelayMessageHandler.java:435)〜[spring-messaging-5.1.6.RELEASE.jar:5.1.6.RELEASE]
在org.springframework.messaging.simp.stomp.StompBrokerRelayMessageHandler.startInternal(StompBrokerRelayMessageHandler.java:401)〜[spring-messaging-5.1.6.RELEASE.jar:5.1.6.RELEASE]
在org.springframework.messaging.simp.broker.AbstractBrokerMessageHandler.start(AbstractBrokerMessageHandler.java:186)〜[spring-messaging-5.1.6.RELEASE.jar:5.1.6.RELEASE]
在org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182)〜[spring-context-5.1.6.RELEASE.jar:5.1.6.RELEASE]
...省略了14个通用框架
引起原因:java.lang.ClassNotFoundException:io.netty.util.concurrent.EventExecutor
在java.net.URLClassLoader.findClass(URLClassLoader.java:381)〜[na:1.8.0_161]
在java.lang.ClassLoader.loadClass(ClassLoader.java:424)〜[na:1.8.0_161]
在sun.misc.Launcher $ AppClassLoader.loadClass(Launcher.java:338)〜[na:1.8.0_161]
在java.lang.ClassLoader.loadClass(ClassLoader.java:357)〜[na:1.8.0_161]
...省略了18个通用框架

最佳答案

您还需要添加一个依赖项。
可能是您错过了这个。

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-reactor-netty</artifactId>
</dependency>

关于java - 无法启动bean 'stompBrokerRelayMessageHandler';嵌套的异常是java.lang.NoClassDefFoundError : io/netty/util/concurrent/EventExecutor,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55762527/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com