title: How to ignore MessageHandlingException while dealing with ProcessBuilder in service-activator
body: <p>That is continuation of the question in <a href="https://stackoverflow.com/questions/35366345/how-to-integrate-legacy-executables-into-spring-integration-application">How to integrate legacy executables into Spring Integration application?</a></p>
  
  <p>I asked about incorporating legacy executable files and then incorporated ProcessBuilder. </p>
  
  <p>ProcessBuilder works fine, however I am getting the org.springframework.messaging.MessageHandlingException: failed to write Message payload to file.  As I understand, my problem is that for any service-activator I need inbound and outbound channels but in reality I am processing the file information in the executable file prj itself.  What is the best way to avoid this kind of exception?
  The configuration file is as follows:</p>
  
  <pre><code>&lt;beans xmlns="http://www.springframework.org/schema/beans"
  ...
  &lt;int-file:inbound-channel-adapter id="producer-file-adapter"
      channel="inboundChannel" directory="file:/Users/anarinsky/springint/chem"
      prevent-duplicates="true"&gt;
      &lt;int:poller fixed-rate="5000" /&gt;
  &lt;/int-file:inbound-channel-adapter&gt;
  
  &lt;int:channel id="inboundChannel" /&gt;
  &lt;int:channel id="outboundChannel" /&gt;
  
  &lt;int:service-activator input-channel="inboundChannel"  output-channel="outboundChannel"
  expression="new ProcessBuilder('/Users/anarinsky/springint/chem/prj', '/Users/anarinsky/springint/chem/a.dat', '/Users/anarinsky/springint/chem/a.out').start()"&gt;
  &lt;/int:service-activator&gt;
  &lt;int-file:outbound-channel-adapter
      channel="outboundChannel" id="consumer-file-adapter"
      directory="file:/Users/anarinsky/springint/chem"/&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>The exception stack starts as follows:</p>
  
  <pre><code>19:29:46.236 ERROR [task-scheduler-1][org.springframework.integration.handler.LoggingHandler] org.springframework.messaging.MessageHandlingException: failed to write Message payload to file
  at org.springframework.integration.file.FileWritingMessageHandler.handleRequestMessage(FileWritingMessageHandler.java:309)
  at org.springframework.integration.handler.AbstractReplyProducingMessageHandler.handleMessageInternal(AbstractReplyProducingMessageHandler.java:170)
  at 
  ...
  Caused by: java.lang.IllegalArgumentException: unsupported Message payload type [java.lang.UNIXProcess]
  at org.springframework.integration.file.FileWritingMessageHandler.handleRequestMessage(FileWritingMessageHandler.java:304)
  ... 45 more
  </code></pre>