0

I have implemented a poller using inbound channel adapter the code works perfectly but it throws this particular exception which i am not able to solve

11:43:27.664 [main] DEBUG o.s.i.u.MessagingMethodInvokerHelper - Method [public void com.ms.aps.fsmessaging.alert.QueryServiceActivator.getMessageProcessStatus(byte[],com.ms.aps.fsmessaging.alert.types.MessageType,java.lang.String) throws java.lang.Exception] is not eligible for Message handling.
java.lang.IllegalArgumentException: Found more than one parameter type candidate: [byte[]] and [com.ms.aps.fsmessaging.alert.types.MessageType]
    at org.springframework.util.Assert.isNull(Assert.java:89) ~[org.springframework.core.jar:3.0.5.RELEASE]
    at org.springframework.integration.util.MessagingMethodInvokerHelper$HandlerMethod.setExclusiveTargetParameterType(MessagingMethodInvokerHelper.java:623) ~[spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.util.MessagingMethodInvokerHelper$HandlerMethod.generateExpression(MessagingMethodInvokerHelper.java:557) ~[spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.util.MessagingMethodInvokerHelper$HandlerMethod.<init>(MessagingMethodInvokerHelper.java:437) ~[spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.util.MessagingMethodInvokerHelper$1.doWith(MessagingMethodInvokerHelper.java:300) ~[spring-integration-core-2.0.5.jar:na]
    at org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:452) [org.springframework.core.jar:3.0.5.RELEASE]
    at org.springframework.integration.util.MessagingMethodInvokerHelper.findHandlerMethodsForTarget(MessagingMethodInvokerHelper.java:274) [spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.util.MessagingMethodInvokerHelper.<init>(MessagingMethodInvokerHelper.java:167) [spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.util.MessagingMethodInvokerHelper.<init>(MessagingMethodInvokerHelper.java:119) [spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.util.MessagingMethodInvokerHelper.<init>(MessagingMethodInvokerHelper.java:114) [spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.handler.MethodInvokingMessageProcessor.<init>(MethodInvokingMessageProcessor.java:56) [spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.handler.ServiceActivatingHandler.<init>(ServiceActivatingHandler.java:34) [spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.config.ServiceActivatorFactoryBean.createMethodInvokingHandler(ServiceActivatorFactoryBean.java:48) [spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.config.AbstractStandardMessageHandlerFactoryBean.createHandler(AbstractStandardMessageHandlerFactoryBean.java:72) [spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean.createHandlerInternal(AbstractSimpleMessageHandlerFactoryBean.java:89) [spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean.getObject(AbstractSimpleMessageHandlerFactoryBean.java:68) [spring-integration-core-2.0.5.jar:na]
    at org.springframework.integration.config.AbstractSimpleMessageHandlerFactoryBean.getObject(AbstractSimpleMessageHandlerFactoryBean.java:31) [spring-integration-core-2.0.5.jar:na]
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:102) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1429) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:245) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveReference(BeanDefinitionValueResolver.java:322) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:106) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1325) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1086) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:517) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:563) [org.springframework.beans.jar:3.0.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:895) [org.springframework.context.jar:3.0.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:425) [org.springframework.context.jar:3.0.5.RELEASE]
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139) [org.springframework.context.jar:3.0.5.RELEASE]
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83) [org.springframework.context.jar:3.0.5.RELEASE]
    at com.ms.aps.fsmessaging.alert.StartPolling.main(StartPolling.java:20) [.ide-bin/:na]

I have used a row mapper to configure the output in the form of object of a bean which stores the resultset.

Bernhard Barker
  • 54,589
  • 14
  • 104
  • 138

2 Answers2

3

This is just a debug message while we iterate over the service to find the matching method. It is benign, and nothing to worry about.

Gary Russell
  • 166,535
  • 14
  • 146
  • 179
  • I just stubled upon this while root causing an mqtt connectivity issue with my Spring integration project. The stacktrace is a bit scary :) (especially in my case as my project simply stops processing msgs after some time). I thought it was related to the stacktrace but apparently not. According to the docs the Assert is typically used for "identifying programmer errors early and clearly at runtime". Seems this is simply an internal debug message no ? Is a stacktrace really necesaary here ? – ddewaele Jul 16 '14 at 12:57
  • 1
    I agree it's a little scary and I have opened a [JIRA Issue](https://jira.spring.io/browse/INT-3474) and we will try to resolve it. Regarding MQTT we noticed that the Paho client sometime blocked indefinitely during a connection close. We have subsequently switched (on master) to use an async client so we can always time out any operations. Not sure if this is related to your issue, but I thought I'd mention it. – Gary Russell Jul 16 '14 at 13:22
  • Thx a lot ! I've put everything in debug mode now to see if that sheds some light on it. Will try to take some thread dumps when the issue occurs. (I guess I should see that blocking issue in a thread dump ?) – ddewaele Jul 16 '14 at 13:35
  • Yes; when our CI builds (tests) hung a couple of times, we took a thread dump and several threads were stuck in the (sync) Paho client `waitForCompletion(-1)`. – Gary Russell Jul 16 '14 at 13:50
  • Hi Gary, I've posted a question on this with some additional details on what we are experiencing. Could be related to what you are seeing. Is that async client availalbe in an official spring integration release ?http://stackoverflow.com/questions/25620196/spring-integration-mqq-subscriber-paho-stops-processing-messages – ddewaele Sep 02 '14 at 09:34
0

Your service activator handler method getMessageProcessStatus can't handle the input data type received. Just use appropriate data type as expected.

Its not find a matching method, its the method name you provided in your service activator.

TuGordoBello
  • 4,350
  • 9
  • 52
  • 78
AliR
  • 2,065
  • 1
  • 27
  • 37