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

FTP shutdown whole context on startup if throwExceptionOnConnectFailed true

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.16.0
    • 2.16.2, 2.17.0
    • camel-ftp
    • None
    • jdk64_1.7.0_71, simple Java program for testing

    • Unknown

    Description

      I recently upgrade from camel 2.14.1 to 2.16.1 and discover following issue: Unable to catch the Exception on startup if throwExceptionOnConnectFailed=true and autoCreate=true or autoCreate not declared.

      If at the time of startup, the FTP site was down or unreachable, the Exception cannot be handled by any means I currently know which are onException route and doTry-doCatch method.

      Following are my FTP parameters:
      &maximumReconnectAttempts=0&stepwise=false&disconnect=true&throwExceptionOnConnectFailed=true&consumer.bridgeErrorHandler=true"

      The only workaround without compromising error log functionality is by adding parameter "autoCreate=false".

      Based on Camel-FTP documentation: "
      For Camel 2.16, autoCreate option is supported. When consumer starts, before polling is scheduled, there's additional FTP operation performed to create the directory configured for endpoint. The default value for autoCreate is true.
      "

      In my opinion, the exception should be able to be caught, instead shutdown the whole Camel context. And description for throwExceptionOnConnectFailed need to be updated so unaware developer does not suffer the same as I did.

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            augus.topor Augus Topor
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: