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

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.17.3
    • Fix Version/s: 2.16.5, 2.17.4, 2.18.1, 2.19.0
    • Component/s: camel-core
    • Labels:
      None
    • Environment:

      Windows 7 / Java 8.

    • Estimated Complexity:
      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

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

                Dates

                • Created:
                  Updated:
                  Resolved: