org.springframework.integration.message.MessageHandlingException: failed to write Message payload to file

spring.io | 7 months 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

    file:outbound-channel-adapter help - Spring Forum

    spring.io | 7 months ago
    org.springframework.integration.message.MessageHandlingException: failed to write Message payload to file

    Root Cause Analysis

    1. java.lang.IllegalArgumentException

      unsupported Message payload type [com.sample.domain.TestMessage]

      at org.springframework.integration.file.FileWritingMessageHandler.handleMessage()
    2. org.springframework.integration
      FileWritingMessageHandler.handleMessage
      1. org.springframework.integration.file.FileWritingMessageHandler.handleMessage(FileWritingMessageHandler.java:103)
      1 frame
    3. Spring Integration Core
      MessageChannelTemplate.send
      1. org.springframework.integration.dispatcher.AbstractDispatcher.sendMessageToHandler(AbstractDispatcher.java:85)
      2. org.springframework.integration.dispatcher.AbstractUnicastDispatcher.dispatch(AbstractUnicastDispatcher.java:54)
      3. org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:56)
      4. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:116)
      5. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:94)
      6. org.springframework.integration.channel.MessageChannelTemplate.doSend(MessageChannelTemplate.java:223)
      7. org.springframework.integration.channel.MessageChannelTemplate.send(MessageChannelTemplate.java:180)
      8. org.springframework.integration.router.AbstractMessageRouter.handleMessageInternal(AbstractMessageRouter.java:76)
      9. org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:48)
      10. org.springframework.integration.dispatcher.AbstractDispatcher.sendMessageToHandler(AbstractDispatcher.java:85)
      11. org.springframework.integration.dispatcher.AbstractUnicastDispatcher.dispatch(AbstractUnicastDispatcher.java:54)
      12. org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:56)
      13. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:116)
      14. org.springframework.integration.channel.MessageChannelTemplate.doSend(MessageChannelTemplate.java:222)
      15. org.springframework.integration.channel.MessageChannelTemplate.send(MessageChannelTemplate.java:180)
      16. org.springframework.integration.handler.AbstractReplyProducingMessageHandler.sendReplyMessage(AbstractReplyProducingMessageHandler.java:119)
      17. org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:107)
      18. org.springframework.integration.handler.AbstractMessageHandler.handleMessage(AbstractMessageHandler.java:48)
      19. org.springframework.integration.dispatcher.AbstractDispatcher.sendMessageToHandler(AbstractDispatcher.java:85)
      20. org.springframework.integration.dispatcher.AbstractUnicastDispatcher.dispatch(AbstractUnicastDispatcher.java:54)
      21. org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:56)
      22. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:116)
      23. org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:94)
      24. org.springframework.integration.channel.MessageChannelTemplate.doSend(MessageChannelTemplate.java:223)
      25. org.springframework.integration.channel.MessageChannelTemplate.send(MessageChannelTemplate.java:180)
      26. org.springframework.integration.channel.MessageChannelTemplate.send(MessageChannelTemplate.java:168)
      26 frames
    4. org.springframework.integration
      ChannelPublishingJmsMessageListener.onMessage
      1. org.springframework.integration.jms.ChannelPublishingJmsMessageListener.onMessage(ChannelPublishingJmsMessageListener.java:203)
      1 frame
    5. Spring Framework
      DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run
      1. org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:506)
      2. org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:463)
      3. org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:435)
      4. org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:322)
      5. org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:260)
      6. org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:944)
      7. org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:868)
      7 frames
    6. Java RT
      Thread.run
      1. java.lang.Thread.run(Unknown Source)
      1 frame