org.springframework.integration.message.MessageHandlingException: error occurred in message handler [ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor@65988886]]

Spring JIRA | Iwein Fuld | 7 years ago
  1. 0

    I've run into this problem while passing around many small files, it surfaced both in a service activator and in a transformer. When I replaced both with implementations of Transformer and MessageHandler, the problem was gone. This evening I'll try to provoke the issue in isolation, but I'm pretty sure it's related to our MethodInvoking* code. Example stacktrace {code} org.springframework.integration.message.MessageHandlingException: error occurred in message handler [ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor@65988886]] at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:68) at org.springframework.integration.handler.MessageHandlerChain.handleMessage(MessageHandlerChain.java:111) at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:103) at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:90) at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:43) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:116) at org.springframework.integration.channel.MessageChannelTemplate.doSend(MessageChannelTemplate.java:223) at org.springframework.integration.channel.MessageChannelTemplate.send(MessageChannelTemplate.java:181) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:153) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:123) at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:62) at org.springframework.integration.dispatcher.BroadcastingDispatcher.invokeHandler(BroadcastingDispatcher.java:119) at org.springframework.integration.dispatcher.BroadcastingDispatcher.access$0(BroadcastingDispatcher.java:117) at org.springframework.integration.dispatcher.BroadcastingDispatcher$1.run(BroadcastingDispatcher.java:104) at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:50) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637) Caused by: java.lang.NullPointerException {code} The nullpointer is thrown the first time the argument is used (Assert.notNull(..) on the first line gives similar result)

    Spring JIRA | 7 years ago | Iwein Fuld
    org.springframework.integration.message.MessageHandlingException: error occurred in message handler [ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor@65988886]]
  2. 0

    I've run into this problem while passing around many small files, it surfaced both in a service activator and in a transformer. When I replaced both with implementations of Transformer and MessageHandler, the problem was gone. This evening I'll try to provoke the issue in isolation, but I'm pretty sure it's related to our MethodInvoking* code. Example stacktrace {code} org.springframework.integration.message.MessageHandlingException: error occurred in message handler [ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor@65988886]] at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:68) at org.springframework.integration.handler.MessageHandlerChain.handleMessage(MessageHandlerChain.java:111) at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:103) at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:90) at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:43) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:116) at org.springframework.integration.channel.MessageChannelTemplate.doSend(MessageChannelTemplate.java:223) at org.springframework.integration.channel.MessageChannelTemplate.send(MessageChannelTemplate.java:181) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:153) at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:123) at org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:62) at org.springframework.integration.dispatcher.BroadcastingDispatcher.invokeHandler(BroadcastingDispatcher.java:119) at org.springframework.integration.dispatcher.BroadcastingDispatcher.access$0(BroadcastingDispatcher.java:117) at org.springframework.integration.dispatcher.BroadcastingDispatcher$1.run(BroadcastingDispatcher.java:104) at org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:50) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:637) Caused by: java.lang.NullPointerException {code} The nullpointer is thrown the first time the argument is used (Assert.notNull(..) on the first line gives similar result)

    Spring JIRA | 7 years ago | Iwein Fuld
    org.springframework.integration.message.MessageHandlingException: error occurred in message handler [ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor@65988886]]

    Root Cause Analysis

    1. org.springframework.integration.message.MessageHandlingException

      error occurred in message handler [ServiceActivator for [org.springframework.integration.handler.MethodInvokingMessageProcessor@65988886]]

      at org.springframework.integration.handler.AbstractMessageHandler.handleMessage()
    2. Spring Integration Core
      ErrorHandlingTaskExecutor$1.run
      1. org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:68)
      2. org.springframework.integration.handler.MessageHandlerChain.handleMessage(MessageHandlerChain.java:111)
      3. org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:103)
      4. org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:90)
      5. org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:43)
      6. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:116)
      7. org.springframework.integration.channel.MessageChannelTemplate.doSend(MessageChannelTemplate.java:223)
      8. org.springframework.integration.channel.MessageChannelTemplate.send(MessageChannelTemplate.java:181)
      9. org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:153)
      10. org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:123)
      11. org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:62)
      12. org.springframework.integration.dispatcher.BroadcastingDispatcher.invokeHandler(BroadcastingDispatcher.java:119)
      13. org.springframework.integration.dispatcher.BroadcastingDispatcher.access$0(BroadcastingDispatcher.java:117)
      14. org.springframework.integration.dispatcher.BroadcastingDispatcher$1.run(BroadcastingDispatcher.java:104)
      15. org.springframework.integration.util.ErrorHandlingTaskExecutor$1.run(ErrorHandlingTaskExecutor.java:50)
      15 frames
    3. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      3. java.lang.Thread.run(Thread.java:637)
      3 frames