Exception Mule-邮件已被筛选器拒绝。消息负载的类型为:byte[]

Exception Mule-邮件已被筛选器拒绝。消息负载的类型为:byte[],exception,mule,mule-studio,payload,Exception,Mule,Mule Studio,Payload,我在Mule中有一个流,我在其中读取一个文件,记录它的内容,然后输出到一个新文件。每次我尝试运行流时,在Mule识别出我的输入文件后,我立即收到以下错误: INFO 2014-03-21 12:23:45,706 [[processes].inputFileConnector.receiver.01] org.mule.transport.file.FileMessageReceiver: Lock obtained on file: /input/file_203812.dat ERROR

我在Mule中有一个流,我在其中读取一个文件,记录它的内容,然后输出到一个新文件。每次我尝试运行流时,在Mule识别出我的输入文件后,我立即收到以下错误:

INFO  2014-03-21 12:23:45,706 [[processes].inputFileConnector.receiver.01] org.mule.transport.file.FileMessageReceiver: Lock obtained on file: /input/file_203812.dat
ERROR 2014-03-21 12:23:45,725 [[processes].inputFileConnector.receiver.01] org.mule.exception.CatchMessagingExceptionStrategy: 
********************************************************************************
Message               : Message has been rejected by filter. Message payload is of type: byte[]
Code                  : MULE_ERROR--2
--------------------------------------------------------------------------------
Exception stack is:
1. Message has been rejected by filter. Message payload is of type: byte[] (org.mule.api.routing.filter.FilterUnacceptedException)
  org.mule.routing.MessageFilter:100 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/api/routing/filter/FilterUnacceptedException.html)
--------------------------------------------------------------------------------
Root Exception stack trace:
org.mule.api.routing.filter.FilterUnacceptedException: Message has been rejected by filter. Message payload is of type: byte[]
    at org.mule.routing.MessageFilter.filterUnacceptedException(MessageFilter.java:100)
    at org.mule.processor.AbstractFilteringMessageProcessor.handleUnaccepted(AbstractFilteringMessageProcessor.java:62)
    at org.mule.processor.AbstractFilteringMessageProcessor.process(AbstractFilteringMessageProcessor.java:48)
    + 3 more (set debug level logging or '-Dmule.verbose.exceptions=true' for everything)
********************************************************************************
我已经尝试解决这个问题一段时间了,但收效甚微,所以我们非常感谢您的帮助。以下是我的配置文件副本供参考:

<file:connector name="outputFileConnector" doc:name="File"/>
<file:connector name="inputFileConnector" workDirectory="/processing" 
    workFileNamePattern="#[message.outboundProperties.originalFilename]" moveToDirectory="/backup" 
    moveToPattern="#[function:datestamp:yyyyMMddHHmmssSSS]_#[message.outboundProperties.originalFilename]"
    streaming="false" doc:name="File"/>

<flow name="MainFlow" doc:name="MainFlow">

    <file:inbound-endpoint name="b2bFileEndpoint" path="/input" pollingFrequency="1000" connector-ref="inputFileConnector" doc:name="Input Trigger">
        <file:filename-regex-filter pattern="file_\d{6}.dat" caseSensitive="true"/> 
    </file:inbound-endpoint>

    <object-to-string-transformer doc:name="Object to String"/>      
    <logger level="INFO" message="#[payload]" doc:name="Debug"/>

    <file:outbound-endpoint path="/output" connector-ref="outputFileConnector" responseTimeout="10000" doc:name="File"/>

    <!-- Error handling -->
    <catch-exception-strategy doc:name="Catch Exception Strategy">
        <logger level="ERROR" message="There has been an error" doc:name="Logger"/>
    </catch-exception-strategy>

</flow>

更新


奇怪的是,如果我将moveToPattern更改为:
#[message.outboundProperties.orginalFilename]
问题就会消失。这不是一个选项,因为我需要处理的文件附加一个日期戳。现在对这个问题非常困惑…

看这里是我的一个例子。。。它工作得很好。。。请根据您的要求修改和添加挡块:-

<file:connector name="File_Input_Global" workDirectory="E:\backup\test_workingDir" workFileNamePattern="#[function:datestamp:dd-MM-yyyy]_#[header:originalFilename].dat" autoDelete="false" streaming="true" validateConnections="true" doc:name="File"/>
<file:connector name="File_output_Global" autoDelete="true" streaming="true" validateConnections="true" doc:name="File"/>
<flow name="FileRegularExpFlow1" doc:name="FileRegularExpFlow1">
    <file:inbound-endpoint path="E:\backup\test" responseTimeout="10000" connector-ref="File_Input_Global" doc:name="File">
        <file:filename-regex-filter pattern="aa.txt" caseSensitive="false"/>
    </file:inbound-endpoint>
    <file:outbound-endpoint path="E:\backup\test_out" outputPattern="#[header:originalFilename]" responseTimeout="10000" connector-ref="File_output_Global" doc:name="File"/>
</flow>


您可以看到工作目录中的文件具有日期戳以及原始文件名。。。请投票选出对您有帮助的答案

Mule版本?我无法使用最新的Studio复制此错误。我使用的是Studio版本3.5.0和独立版本3.4.0-此外,作为参考,我尝试使用的文件是一个.dat文件,其中的内容是一行包含6个DigitsThank@Anirban。但是,这个解决方案没有指定moveToDirectory,我认为这就是我的错误的来源?