运行mule服务器时出错

时间:2016-03-23 12:41:14

标签: java mule

我已经创建了一个从Mule端压缩文件的流程,但是我收到了一个错误:

  

java.lang.IllegalStateException:至少有2个连接符匹配协议"文件",因此必须使用'连接器'在端点上指定要使用的连接器。属性/属性。配置中支持" file"的连接器是:输入,输出,

这是流程:

<flow name="GZipCompress" doc:name="GZipCompress"> 
 <file:inbound-endpoint path="C:backuptest" responseTimeout="10000" doc:name="File"> 
 <file:filename-regex-filter pattern="abc.doc" caseSensitive="false" /> 
 </file:inbound-endpoint> <string-to-byte-array-transformer doc:name="String to Byte Array" /> 
 <logger message="Payload size before compression : #[Integer.parseInt(payload.size())/1024] KB" level="INFO" doc:name="Logger" />
<!-- If you send gzip a String then it gets serialized and mess ends up in the gzip file. To avoid this convert to byte[] first --> 
 <gzip-compress-transformer /> <logger message="Payload size after compression : #[Integer.parseInt(payload.size())/1024] KB" level="INFO" doc:name="Logger" /> 
 <file:outbound-endpoint path="C:backuptestnewfolder" responseTimeout="10000" doc:name="File" /> </flow>

1 个答案:

答案 0 :(得分:0)

  

至少有2个连接器符合协议&#34;文件&#34;,因此必须使用&#39;连接器&#39;在端点上指定要使用的连接器。属性/属性。配置中支持&#34; file&#34;的连接器是:输入,输出,

此错误表明您已定义了file global connectors,现在mule并不知道将您所声明的文件端点附加到哪一个。一种解决方案是在文件入站端点中定义connector-ref属性,并引用您已定义的input连接器。

<file:inbound-endpoint connector-ref="input" path="C:backuptest" responseTimeout="10000" doc:name="File"/>