org.springframework.integration.MessagingException: failed to find JMX operation 'stopActiveComponents' on MBean [org.springframework.integration.monitor:name=integrationMBeanExporter,type=IntegrationMBeanExporter] of type [org.springframework.integration.monitor.IntegrationMBeanExporter] with 2 parameters: [p2, p1]

Spring JIRA | sibidiba | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    It is impossible to invoke any operation with any argument type being a primitive. OperationInvokingMessageHandler.handleRequestMessage() finds the correct operation, but when matching the signature, comparing arguments, it will never match primitive types. {code:java} if (value != null && value.getClass().getName().equals(paramInfo.getType())) { } {code} You have no possibility to pass primitive types herein: {{value.getClass().getName()}} will return "java.lang.Boolean" not equal to {{paramInfo.getType()}} returning "boolean". The same applies to lont, int etc. E.g. it is impossible to call stopActiveComponents of integrationMBeanExporter ... {code:xml} <int:channel id="shutdownChannel" /> <int-jmx:operation-invoking-channel-adapter id="shutdownAdapter" channel="shutdownChannel" object-name="org.springframework.integration.monitor:name=integrationMBeanExporter,type=IntegrationMBeanExporter" operation-name="stopActiveComponents"/> {code} ... {code:java} List<Object> arguments = new LinkedList<Object>(); arguments.add(true); arguments.add(0); shutdownChannel.send(MessageBuilder.withPayload(arguments).build()); {code} Results in: {code} Exception in thread "Thread-1" org.springframework.integration.MessagingException: failed to find JMX operation 'stopActiveComponents' on MBean [org.springframework.integration.monitor:name=integrationMBeanExporter,type=IntegrationMBeanExporter] of type [org.springframework.integration.monitor.IntegrationMBeanExporter] with 2 parameters: [p2, p1] at org.springframework.integration.jmx.OperationInvokingMessageHandler.handleRequestMessage(OperationInvokingMessageHandler.java:154) ... {code}

    Spring JIRA | 3 years ago | sibidiba
    org.springframework.integration.MessagingException: failed to find JMX operation 'stopActiveComponents' on MBean [org.springframework.integration.monitor:name=integrationMBeanExporter,type=IntegrationMBeanExporter] of type [org.springframework.integration.monitor.IntegrationMBeanExporter] with 2 parameters: [p2, p1]
  2. 0

    It is impossible to invoke any operation with any argument type being a primitive. OperationInvokingMessageHandler.handleRequestMessage() finds the correct operation, but when matching the signature, comparing arguments, it will never match primitive types. {code:java} if (value != null && value.getClass().getName().equals(paramInfo.getType())) { } {code} You have no possibility to pass primitive types herein: {{value.getClass().getName()}} will return "java.lang.Boolean" not equal to {{paramInfo.getType()}} returning "boolean". The same applies to lont, int etc. E.g. it is impossible to call stopActiveComponents of integrationMBeanExporter ... {code:xml} <int:channel id="shutdownChannel" /> <int-jmx:operation-invoking-channel-adapter id="shutdownAdapter" channel="shutdownChannel" object-name="org.springframework.integration.monitor:name=integrationMBeanExporter,type=IntegrationMBeanExporter" operation-name="stopActiveComponents"/> {code} ... {code:java} List<Object> arguments = new LinkedList<Object>(); arguments.add(true); arguments.add(0); shutdownChannel.send(MessageBuilder.withPayload(arguments).build()); {code} Results in: {code} Exception in thread "Thread-1" org.springframework.integration.MessagingException: failed to find JMX operation 'stopActiveComponents' on MBean [org.springframework.integration.monitor:name=integrationMBeanExporter,type=IntegrationMBeanExporter] of type [org.springframework.integration.monitor.IntegrationMBeanExporter] with 2 parameters: [p2, p1] at org.springframework.integration.jmx.OperationInvokingMessageHandler.handleRequestMessage(OperationInvokingMessageHandler.java:154) ... {code}

    Spring JIRA | 3 years ago | sibidiba
    org.springframework.integration.MessagingException: failed to find JMX operation 'stopActiveComponents' on MBean [org.springframework.integration.monitor:name=integrationMBeanExporter,type=IntegrationMBeanExporter] of type [org.springframework.integration.monitor.IntegrationMBeanExporter] with 2 parameters: [p2, p1]

    Root Cause Analysis

    1. org.springframework.integration.MessagingException

      failed to find JMX operation 'stopActiveComponents' on MBean [org.springframework.integration.monitor:name=integrationMBeanExporter,type=IntegrationMBeanExporter] of type [org.springframework.integration.monitor.IntegrationMBeanExporter] with 2 parameters: [p2, p1]

      at org.springframework.integration.jmx.OperationInvokingMessageHandler.handleRequestMessage()
    2. Spring Integration JMX Support
      OperationInvokingMessageHandler.handleRequestMessage
      1. org.springframework.integration.jmx.OperationInvokingMessageHandler.handleRequestMessage(OperationInvokingMessageHandler.java:154)
      1 frame