ActiveMQ Artemis问题-java.lang.NoSuchFieldError:WRITE_BUFFER_WATER_MARK

时间:2019-02-21 15:05:58

标签: spring-boot jms-topic activemq-artemis

我有一个Spring Boot应用程序。此应用程序需要侦听来自部署在另一个应用程序中的JMS主题的消息(假设此应用程序名称为Topic)。本主题应用程序在wildfly 11上运行,并使用ActiveMQ Artemis。

做了以下事情,

将我的JNDI属性指向“主题”应用程序的地址,如下所示,

java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory
java.naming.provider.url=http-remoting://topic-application-address:port
java.naming.security.principal=username
java.naming.security.credentials=password

在Spring Boot应用程序中包括与ActiveMQ Artemis相关的库。

Gradle版本:

compile group: 'org.springframework.boot', name: 'spring-boot-starter-artemis', version: '2.1.3.RELEASE'
compile group: 'org.apache.activemq', name: 'artemis-commons', version: '2.6.4'
compile group: 'org.apache.activemq', name: 'artemis-core-client', version: '2.6.4'
compile group: 'org.apache.activemq', name: 'artemis-jms-client', version: '2.6.4'
compile group: 'javax.json', name: 'javax.json-api', version: '1.1.4'
compile group: 'io.netty', name: 'netty-all', version: '4.1.33.Final'

当我启动Spring Boot应用程序时,

我收到以下异常

2019-02-21 10:58:43.519  INFO 12925 --- [main] o.s.c.support.DefaultLifecycleProcessor  : Starting beans in phase 2147483647
2019-02-21 10:58:43.676  WARN 12925 --- [main] s.c.a.AnnotationConfigApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'org.springframework.jms.config.internalJmsListenerEndpointRegistry'; nested exception is java.lang.NoSuchFieldError: WRITE_BUFFER_WATER_MARK
2019-02-21 10:58:43.683  INFO 12925 --- [main] o.s.s.c.ThreadPoolTaskScheduler          : Shutting down ExecutorService 'threadPoolTaskScheduler'
2019-02-21 10:58:43.692  INFO 12925 --- [main] j.LocalContainerEntityManagerFactoryBean : Closing JPA EntityManagerFactory for persistence unit 'default'
2019-02-21 10:58:43.693  INFO 12925 --- [main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown initiated...
2019-02-21 10:58:43.702  INFO 12925 --- [main] com.zaxxer.hikari.HikariDataSource       : HikariPool-1 - Shutdown completed.

尽管该字段在jar netty-all-4.1.33.Final.jar(位于io.netty.channe.ChannelOption类中)中可用,但我不确定为什么它找不到该字段。如何解决此问题。

0 个答案:

没有答案