« Return to Thread: FTP connector

FTP connector

by jlu :: Rate this Message:

Reply to Author | View in Thread

Hi,

Does anybody successfully run this simple FTP example as it is in both mule 2.0.0 and 2.0.1? The example is provided by book "Open Source ESBs in Action". I always get the error messages following the enclosed xml. I saw quite a few postings on this problem. Does it get fixed or I did something wrong? Any help will be appreciated!

Jeffrey Lu


mule xmlns="http://www.mulesource.org/schema/mule/core/2.0"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:file="http://www.mulesource.org/schema/mule/file/2.0"
    xmlns:ftp="http://www.mulesource.org/schema/mule/ftp/2.0"
    xsi:schemaLocation="
    http://www.mulesource.org/schema/mule/core/2.0 http://www.mulesource.org/schema/mule/core/2.0/mule.xsd
        http://www.mulesource.org/schema/mule/file/2.0 http://www.mulesource.org/schema/mule/file/2.0/mule-file.xsd
        http://www.mulesource.org/schema/mule/ftp/2.0 http://www.mulesource.org/schema/mule/ftp/2.0/mule-ftp.xsd">

  <ftp:connector name="ftpConnector"
      validateConnections="true" />

  <model name="file-model">
    <service name="file-reader-ftp-writer">
      <inbound>
        <file:inbound-endpoint
            path="test-data/in" />
      </inbound>
      <outbound>
        <outbound-pass-through-router>
          <ftp:outbound-endpoint
            user="mule5"                      
            password="topia1"
            host="localhost"
            port="21"
            outputPattern="${ORIGINALNAME}-${SYSTIME}.dat"
            passive="false" />
        </outbound-pass-through-router>
      </outbound>
    </service>
  </model>
</mule>



ERROR 2008-05-15 15:51:59,890 [ftpConnector.dispatcher.10] org.mule.DefaultExceptionStrategy:
********************************************************************************
Message               : Streaming failed. Could not get output stream. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=ftp://mule5:<password>@localhost, connector=FtpConnector{this=4265ae, started=true, initialised=true, name='ftpConnector', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[ftp], serviceOverrides=null}, transformer=[], name='endpoint.ftp.localhost.21', properties={passive=false, outputPattern=${ORIGINALNAME}-${SYSTIME}.dat}, transactionConfig=Transaction{factory=null, action=NONE, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null, synchronous=false, initialState=started, remoteSync=false, remoteSyncTimeout=3000, endpointEncoding=UTF-8}. Message payload is of type: ReceiverFileInputStream
Type                  : org.mule.api.transport.DispatchException
Code                  : MULE_ERROR-42999
JavaDoc               : http://mule.mulesource.org/docs/apidocs/org/mule/api/transport/DispatchException.html
Payload               : org.mule.transport.file.ReceiverFileInputStream@b49448
********************************************************************************
Exception stack is:
1. Ftp error: 530 (java.io.IOException)
  org.mule.transport.ftp.FtpConnectionFactory:50 (http://java.sun.com/j2se/1.5.0/docs/api/java/io/IOException.html)
2. Streaming failed. Could not get output stream. Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=ftp://mule5:<password>@localhost, connector=FtpConnector{this=4265ae, started=true, initialised=true, name='ftpConnector', disposed=false, numberOfConcurrentTransactedReceivers=4, createMultipleTransactedReceivers=true, connected=true, supportedProtocols=[ftp], serviceOverrides=null}, transformer=[], name='endpoint.ftp.localhost.21', properties={passive=false, outputPattern=${ORIGINALNAME}-${SYSTIME}.dat}, transactionConfig=Transaction{factory=null, action=NONE, timeout=0}, filter=null, deleteUnacceptedMessages=false, securityFilter=null, synchronous=false, initialState=started, remoteSync=false, remoteSyncTimeout=3000, endpointEncoding=UTF-8}. Message payload is of type: ReceiverFileInputStream (org.mule.api.transport.DispatchException)
  org.mule.transport.ftp.FtpConnector:538 (http://mule.mulesource.org/docs/apidocs/org/mule/api/transport/DispatchException.html)
********************************************************************************
Root Exception stack trace:
java.io.IOException: Ftp error: 530
        at org.mule.transport.ftp.FtpConnectionFactory.makeObject(FtpConnectionFactory.java:50)
        at org.apache.commons.pool.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:974)
        at org.mule.transport.ftp.FtpConnector.getFtp(FtpConnector.java:157)
        at org.mule.transport.ftp.FtpConnector.createFtpClient(FtpConnector.java:578)
        at org.mule.transport.ftp.FtpConnector.getOutputStream(FtpConnector.java:504)
        at org.mule.transport.ftp.FtpMessageDispatcher.doDispatch(FtpMessageDispatcher.java:43)
        at org.mule.transport.AbstractMessageDispatcher$Worker.run(AbstractMessageDispatcher.java:262)
        at org.mule.work.WorkerContext.run(WorkerContext.java:310)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
        at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
        at java.lang.Thread.run(Thread.java:613)

 « Return to Thread: FTP connector