繁体   English   中英

Spring Boot & ActiveMQ Artemis:应用程序启动期间出现 NoClassDefFoundError

[英]Spring Boot & ActiveMQ Artemis: NoClassDefFoundError during start of application

尝试使用 ActiveMQ Artemis 创建 Spring Boot Java 应用程序时,出现以下异常:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'artemisConfiguration' defined in class path resource [org/springframework/boot/autoconfigure/jms/artemis/ArtemisEmbeddedServerConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.activemq.artemis.core.config.Configuration]: Factory method 'artemisConfiguration' threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/activemq/artemis/api/core/QueueConfiguration

从上面的异常中,我很难理解可能缺少什么配置或者是其他什么? 我正在使用 Spring Boot 2.7.3。

它按照本指南(本机和嵌入式)中的描述实现。

根本问题是这样的:

java.lang.NoClassDefFoundError: org/apache/activemq/artemis/api/core/QueueConfiguration

这意味着JVM找不到这个class。这个class在artemis-commons模块中。 您需要将它放在应用程序的类路径中。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM