在mule中创建多个文件传输流时出错

在mule中创建多个文件传输流时出错,mule,Mule,我有一个需要有三个不同的定期工作,以拿起文件和传输到一个SFTP服务器。通过示例,我能够创建一个单一的工作流程。然而,当我复制该流并调整配置时,我收到一个错误,抱怨2个连接器与协议文件匹配 它要求我指定这些,但是,我已经指定了每个流应该使用哪个端点 有人知道我做错了什么,或者Mule在找什么吗 流量定义: <file:endpoint name="partsDataConnector" path="${partsDataOriginFilePath}" pollingFrequency="

我有一个需要有三个不同的定期工作,以拿起文件和传输到一个SFTP服务器。通过示例,我能够创建一个单一的工作流程。然而,当我复制该流并调整配置时,我收到一个错误,抱怨2个连接器与协议文件匹配

它要求我指定这些,但是,我已经指定了每个流应该使用哪个端点

有人知道我做错了什么,或者Mule在找什么吗

流量定义:

<file:endpoint name="partsDataConnector" path="${partsDataOriginFilePath}" pollingFrequency="5000" doc:name="partsDataFile"/>

<flow name="partsDataTransfer">

    <quartz:inbound-endpoint jobName="partsDataTransfer"
                             repeatInterval="10000" responseTimeout="10000" doc:name="Quartz">

        <quartz:endpoint-polling-job>
            <quartz:job-endpoint ref="partsDataConnector"/>
        </quartz:endpoint-polling-job>
    </quartz:inbound-endpoint>
    <sftp:outbound-endpoint host="${destinationFileServerIp}" port="${destinationFileServerPort}"
                            path="${partsDataDestinationPath}" tempDir="${partsDataDestinationTempDir}"
                            user="${destinationFileServerUser}" password="${destinationFileServerPassword}"
                            outputPattern="#[header:originalFilename]" />
</flow>

<file:endpoint name="imageDataConnector" path="${imageDataOriginFilePath}" pollingFrequency="5000" doc:name="partsDataFile"/>

<flow name="imageDataTransfer">
    <quartz:inbound-endpoint jobName="imageDataTransfer"
                             repeatInterval="10000" responseTimeout="10000" doc:name="Quartz">

        <quartz:endpoint-polling-job>
            <quartz:job-endpoint ref="imageDataConnector"/>
        </quartz:endpoint-polling-job>
    </quartz:inbound-endpoint>
    <sftp:outbound-endpoint host="${destinationFileServerIp}" port="${destinationFileServerPort}"
                            path="${imageDataDestinationPath}" tempDir="${imageDataDestinationTempDir}"
                            user="${destinationFileServerUser}" password="${destinationFileServerPassword}"
                            outputPattern="#[header:originalFilename]" />
</flow>

<file:endpoint name="customerDataConnector" path="${customerDataOriginFilePath}" pollingFrequency="5000" doc:name="partsDataFile"/>

<flow name="customerDataTransfer">
    <quartz:inbound-endpoint jobName="customerDataTransfer"
                             repeatInterval="10000" responseTimeout="10000" doc:name="Quartz">

        <quartz:endpoint-polling-job>
            <quartz:job-endpoint ref="customerDataConnector" />
        </quartz:endpoint-polling-job>
    </quartz:inbound-endpoint>
    <sftp:outbound-endpoint host="${destinationFileServerIp}" port="${destinationFileServerPort}"
                            path="${customerDataDestinationPath}" tempDir="${customerDataDestinationTempDir}"
                            user="${destinationFileServerUser}" password="${destinationFileServerPassword}"
                            outputPattern="#[header:originalFilename]" />
</flow>

堆栈跟踪:

2014-04-09 06:46:44924信息[org.quartz.core.JobRunShell]工作骡子。quartz://customerDataTransfer 引发了JobExecutionException异常: org.quartz.JobExecutionException:org.mule.transport.service.TransportFactoryException:至少有2个连接器与协议“文件”匹配,因此必须使用“连接器”属性/属性在端点上指定要使用的连接器。配置中支持“文件”的连接器有:connector.file.mule.default、connector.file.mule.default.1、(java.lang.IllegalStateException)[请参阅嵌套异常:org.mule.transport.service.TransportFactoryException:至少有2个连接器与协议“文件”匹配,因此必须使用“connector”属性/属性在端点上指定要使用的连接器。配置中支持“file”的连接器有:connector.file.mule.default、connector.file.mule.default.1、(java.lang.IllegalStateException)] 在org.mule.transport.quartz.jobs.EndpointPollingJob.doExecute(EndpointPollingJob.java:176)上 位于org.mule.transport.quartz.jobs.AbstractJob.execute(AbstractJob.java:36) 位于org.quartz.core.JobRunShell.run(JobRunShell.java:202) 位于org.quartz.siml.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:534)



错误消息要求您声明显式
文件:连接器
组件。现在您只有
file:endpoint
组件。

如果您还没有定义文件connectr。尝试声明一个并在每个文件端点上添加连接器引用

<file:connector name="myFileConnector" ></file:connector>
<file:endpoint name="imageDataConnector"  connector-ref="myFileConnector" path="${imageDataOriginFilePath}" pollingFrequency="5000" doc:name="partsDataFile"/>

在每个文件端点上添加连接器引用,如下所示。为所有三个文件端点添加引用

<file:connector name="myFileConnector" ></file:connector>
<file:endpoint name="imageDataConnector"  connector-ref="myFileConnector" path="${imageDataOriginFilePath}" pollingFrequency="5000" doc:name="partsDataFile"/>


希望这有帮助。

您是否在配置中定义了多个文件连接器?因为上面显示的错误提到有两个文件连接器。