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

Bundle in 'Active' State but Camel Context not initialized

    XMLWordPrintableJSON

    Details

    • Estimated Complexity:
      Unknown

      Description

      The camel context can't get initialized when validation of the RouteDefinition failed (e.g. typo in Uri or add an unsupported option in Uri), but when deploy the blueprint, the CamelContext startup and then shutdown, but the bundle status is still 'Active', only a FailedToCreateRouteException ERROR is logged.

      318 │ Active │ 80 │ 0.0.0 │ blueprint.xml

      Attached the simple blueprint.xml for reproduce it.

      The expected behaviour is the bundle is in the 'Failure' status in this case.

      The fix proposal from my side is, move the call of "this.maybeStart()" from blueprintEvent() method to the constructor of the BlueprintCamelContext class. then this kind of Route definition error can be processed during the Blueprint "CREATING" phase. Currently, the start() is invoked after Blueprint in "CREATED" phase. (I tested this fix locally and have the expected 'Failure' bundle status)

      (This issue is found in Camel 2.20.x, 2.21.x, but it may affects also on master branch)

        Attachments

        1. blueprint.xml
          0.4 kB
          Xilai Dai

          Issue Links

            Activity

              People

              • Assignee:
                ggrzybek Grzegorz Grzybek
                Reporter:
                xldai Xilai Dai
              • Votes:
                5 Vote for this issue
                Watchers:
                7 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: