2014-11-25 120 views
0

我在將文件傳輸到ftp服務器時遇到問題。 下面是我的代碼在ftp mule上傳輸文件時遇到問題

<sfdc:config name="Salesforce" username="myUserName" password="pwd" securityToken="mytokens" doc:name="Salesforce"/> 
    <file:connector name="File" autoDelete="true" streaming="true" validateConnections="true" doc:name="File"/> 
    <data-mapper:config name="List_Contact__To_CSV" transformationGraphPath="list_contact__to_csv.grf" doc:name="List_Contact__To_CSV"/> 
    <ftp:connector name="ftpConnector" streaming="true" doc:name="FTP"/> 
    <batch:job name="Batch1"> 
     <batch:threading-profile poolExhaustedAction="WAIT"/> 
     <batch:input> 
      <poll doc:name="Poll"> 
       <fixed-frequency-scheduler frequency="2" timeUnit="MINUTES"/> 
       <sfdc:query config-ref="Salesforce" query="dsql:SELECT Email,Name FROM Contact" fetchSize="20" doc:name="Salesforce"/> 
      </poll> 
     </batch:input> 
     <batch:process-records> 
      <batch:step name="Batch_Step"> 
       <batch:commit size="20" doc:name="Batch Commit"> 
        <data-mapper:transform config-ref="List_Contact__To_CSV" doc:name="List&lt;Contact&gt; To CSV"/> 
        <file:outbound-endpoint path="/home/Desktop/Input" outputPattern="test.csv" connector-ref="File" responseTimeout="10000" doc:name="File"/> 
        <logger level="INFO" doc:name="Logger"/> 
        <ftp:outbound-endpoint path="myPath" host="208.115.etc.." port="21" user="[email protected]" password="pwd" outputPattern="test.csv" connector-ref="ftpConnector" mimeType="application/csv" responseTimeout="10000" doc:name="ftp"/> 
       </batch:commit> 
      </batch:step> 
     </batch:process-records> 
    </batch:job> 

我的文件被成功保存在我的桌面上,但沒有我的FTP服務器上轉移。我有以下錯誤

------------------------------------------------------------------------------- 
Exception stack is: 
1. hostname can't be null (java.lang.IllegalArgumentException) 
    java.net.InetSocketAddress:149 (null) 
2. hostname can't be null (java.lang.IllegalArgumentException) (org.mule.transport.ConnectException) 
    org.mule.transport.ftp.FtpConnector:552 (http://www.mulesoft.org/docs/site/current3/apidocs/org/mule/transport/ConnectException.html) 
-------------------------------------------------------------------------------- 
Root Exception stack trace: 
java.lang.IllegalArgumentException: hostname can't be null 

什麼解決的辦法,請幫我

回答

0

由於您的登錄憑證包括@,必須使用40%逃避它。 嘗試將您的用戶更改爲user =「name%40client.test.in」