Uploaded image for project: 'ActiveMQ Artemis'
  1. ActiveMQ Artemis
  2. ARTEMIS-3841

createConnectorService ClassCastException

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Not A Bug
    • 2.20.0, 2.22.0
    • None
    • Configuration, JMX, Web Console
    • None

    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)

      1. test-connector
      2. org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory
      3. {"host": "127.0.0.1", "port": 61616}

      Attachments

        Issue Links

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            Unassigned Unassigned
            HartmutH Hartmut Horrer
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment