Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Not A Bug
-
2.20.0, 2.22.0
-
None
-
None
-
Linux xxxxx 5.17.6-1-MANJARO #1 SMP PREEMPT Mon May 9 07:52:43 UTC 2022 x86_64 GNU/L
openjdk 11.0.14 2022-01-18
OpenJDK Runtime Environment GraalVM CE 22.0.0.2 (build 11.0.14+9-jvmci-22.0-b05)
OpenJDK 64-Bit Server VM GraalVM CE 22.0.0.2 (build 11.0.14+9-jvmci-22.0-b05, mixed mode, sharing)
{}Apache ActiveMQ Artemis 2.22.0
ActiveMQ Artemis home: /home/hartmut/Programme/activemq-0
ActiveMQ Artemis instance: /home/hartmut/Programme/activemq-0/broker-0Linux xxxxx 5.17.6-1-MANJARO #1 SMP PREEMPT Mon May 9 07:52:43 UTC 2022 x86_64 GNU/L openjdk 11.0.14 2022-01-18 OpenJDK Runtime Environment GraalVM CE 22.0.0.2 (build 11.0.14+9-jvmci-22.0-b05) OpenJDK 64-Bit Server VM GraalVM CE 22.0.0.2 (build 11.0.14+9-jvmci-22.0-b05, mixed mode, sharing) { } Apache ActiveMQ Artemis 2.22.0 ActiveMQ Artemis home: /home/hartmut/Programme/activemq-0 ActiveMQ Artemis instance: /home/hartmut/Programme/activemq-0/broker-0
Description
We hit a problem with the createConnectorService() call via web console or Jolokia:
Caused by: org.jolokia.client.exception.J4pRemoteException: java.lang.ClassCastException : class org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory cannot be cast to class org.apache.activemq.artemis.core.server.ConnectorServiceFactory (org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory and org.apache.activemq.artemis.core.server.ConnectorServiceFactory are in unnamed module of loader java.net.URLClassLoader @4e9ba398) at org.jolokia.client.request.ValidatingResponseExtractor.extract(ValidatingResponseExtractor.java:63) at org.jolokia.client.J4pClient.execute(J4pClient.java:195) at org.jolokia.client.J4pClient.execute(J4pClient.java:168) at org.jolokia.client.J4pClient.execute(J4pClient.java:117) at de.wilken.p5.fw.communication.impl.messaging.management.JolokiaManagementBean.execute(JolokiaManagementBean.java:577) ... 73 more
After a look in the Artemis source code we come to the following conclusion org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory implements org.apache.activemq.artemis.spi.core.remoting.ConnectorFactory and not org.apache.activemq.artemis.core.server.ConnectorServiceFactory. ConnectorService which is created by the ConnectorServiceFactory is deprecated!
Is there an alternative way to add a connector via Jolokia API?
How it should work, as I understand from the web console:
createConnectorService(java.lang.String, java.lang.String, java.util.Map)
- test-connector
- org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory
- {"host": "127.0.0.1", "port": 61616}
Attachments
Attachments
Issue Links
- is related to
-
ARTEMIS-3843 add/remove connector via mangement
- Closed