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

"FILE" component with option "readLock=rename" throws FileNotFound exception in case of work file is locked/used by another application

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.17.3
    • 2.16.5, 2.17.4, 2.18.1, 2.19.0
    • camel-core
    • None
    • Windows 7 / Java 8.

    • Novice

    Description

      Option "readLock=rename" (according to htttp://camel.apache.org/file2.html) is necessary to lock work file in case of it is not used by another application. But currently we see "FileNotFound" during test rename operation and "FILE" component tries to lock and process corresponding work file.

      This issue can be resolved by wrapping of corresponding rename operation by try-catch block. See diff.txt for "camel-core/src/main/java/org/apache/camel/component/file/strategy/GenericFileRenameExclusiveReadLockStrategy.java" in attachment which shows way to correct current issue.

      Similar issue is applicable for previous Camel version also.

      Attachments

        1. camel-core.patch
          2 kB
          Andrey Poltavtsev
        2. diff.txt
          0.5 kB
          Andrey Poltavtsev

        Issue Links

          Activity

            People

              davsclaus Claus Ibsen
              apoltavtsev Andrey Poltavtsev
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: