运行mule服务器时出错



我创建了一个流来压缩Mule端的文件,但我得到了一个错误:

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

这就是流程:

<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>

至少有2个连接器与协议"文件"匹配,因此必须在端点上使用"connector"属性/属性指定要使用的连接器。配置中支持"文件"的连接器有:输入、输出、

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

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

相关内容

最新更新