Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/clojure/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot ActiveMQ Artemis问题-java.lang.NoSuchFieldError:写入缓冲区水标记_Spring Boot_Jms Topic_Activemq Artemis - Fatal编程技术网

Spring boot ActiveMQ Artemis问题-java.lang.NoSuchFieldError:写入缓冲区水标记

Spring boot ActiveMQ Artemis问题-java.lang.NoSuchFieldError:写入缓冲区水标记,spring-boot,jms-topic,activemq-artemis,Spring Boot,Jms Topic,Activemq Artemis,我有一个spring启动应用程序。此应用程序需要侦听来自部署在另一个应用程序中的JMS主题的消息(假设此应用程序名为Topic)。本主题应用程序在wildfly 11上运行,并使用ActiveMQ Artemis 做了以下几件事, 将我的JNDI属性指向主题应用程序的地址,如下所示 java.naming.factory.initial=org.jboss.naming.remote.client.InitialContextFactory java.naming.provider.url=ht

我有一个spring启动应用程序。此应用程序需要侦听来自部署在另一个应用程序中的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引导应用程序中包含与ActiveMQ Artemis相关的库

渐变构建:

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启动应用程序时

我得到下面的例外

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类中)中可用,但我不确定它为什么找不到该字段。如何解决此问题。

如果使用Netty 4.1.24.Final,会发生什么情况?这是为ActiveMQ Artemis 2.6.4定义的实际Netty依赖项。请参阅。@JustinBertram尝试了Netty 4.1.24 Final和一些旧版本,如4.1.9 Final。仍然得到相同的异常。