Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6056

Moving files on FTP not working

Attach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.10.3, 2.10.4, 2.11.0
    • Fix Version/s: 2.10.5, 2.11.0
    • Component/s: camel-ftp
    • Labels:
    • Estimated Complexity:
      Unknown

      Description

      Moving files stored on a ftp server to another directory specified by the move parameter is not working in camel versions 2.10.3, 2.10.4-SNAPSHOT and 2.11-SNAPSHOT.
      (The ftp user got write permission.)
      Whereas the file is moved as expected when using version 2.10.2

      The stacktrace I got when executing the test on camel version 2.10.3:

      11:04:56,822 WARN [org.apache.camel.component.file.GenericFileOnCompletion] (Camel (camel-1) thread #1 - ftp://myftp.com) Caused by: [org.apache.camel.component.file.GenericFileOperationFailedException - File operation failed: 550 Failed to change directory.
      Cannot change directory to:
      . Code: 550]: org.apache.camel.component.file.GenericFileOperationFailedException: File operation failed: 550 Failed to change directory.
      Cannot change directory to:
      . Code: 550
      at org.apache.camel.component.file.remote.FtpOperations.doChangeDirectory(FtpOperations.java:704) [camel-ftp-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.component.file.remote.FtpOperations.changeCurrentDirectory(FtpOperations.java:660) [camel-ftp-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.component.file.remote.FtpOperations.buildDirectory(FtpOperations.java:284) [camel-ftp-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.component.file.strategy.GenericFileProcessStrategySupport.renameFile(GenericFileProcessStrategySupport.java:100) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.component.file.strategy.GenericFileRenameProcessStrategy.commit(GenericFileRenameProcessStrategy.java:86) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.component.file.GenericFileOnCompletion.processStrategyCommit(GenericFileOnCompletion.java:134) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.component.file.GenericFileOnCompletion.onCompletion(GenericFileOnCompletion.java:82) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.component.file.GenericFileOnCompletion.onComplete(GenericFileOnCompletion.java:53) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:55) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:226) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.processor.UnitOfWorkProcessor.doneUow(UnitOfWorkProcessor.java:199) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.processor.UnitOfWorkProcessor.processSync(UnitOfWorkProcessor.java:139) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:115) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.processor.RouteInflightRepositoryProcessor.processNext(RouteInflightRepositoryProcessor.java:48) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:90) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:72) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.component.file.GenericFileConsumer.processExchange(GenericFileConsumer.java:336) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.component.file.remote.RemoteFileConsumer.processExchange(RemoteFileConsumer.java:92) [camel-ftp-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.component.file.GenericFileConsumer.processBatch(GenericFileConsumer.java:189) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.component.file.GenericFileConsumer.poll(GenericFileConsumer.java:155) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.impl.ScheduledPollConsumer.doRun(ScheduledPollConsumer.java:142) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:92) [camel-core-2.10.4-SNAPSHOT.jar:2.10.4-SNAPSHOT]
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439) [rt.jar:1.6.0_37]
      at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317) [rt.jar:1.6.0_37]
      at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150) [rt.jar:1.6.0_37]
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98) [rt.jar:1.6.0_37]
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:180) [rt.jar:1.6.0_37]
      at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:204) [rt.jar:1.6.0_37]
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_37]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_37]
      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_37]

      The anonymized test case:

      @Test
      public void testFTPMove() throws Exception{
      context.addRoutes(new RouteBuilder() {
      @Override
      public void configure() throws Exception {
      from("ftp://user@ftpserver.com:21" +
      "/folder/subfolder/" +
      "?password=mypassword" +
      "&ftpClient.dataTimeout=30000" +
      "&binary=true" +
      "&move=.success" +
      "&antInclude=file*.txt")
      .log("${body}");
      }
      });
      Thread.sleep(3000);
      context.stop();
      }

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              csch Christian Schaefer

              Dates

              • Created:
                Updated:
                Resolved:

                Issue deployment