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

VetoCamelContextStartException with rethrowException=false cases MainSupport class to hang

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.17.0
    • 2.18.0
    • camel-core
    • None
    • Unknown

    Description

      Hi,

      I just created my own LifecycleStrategy implementation, that performs some sanity checks on context startup, and throws a VetoCamelContextStartException if it detects a problem. But since I only want a user friendly error message to be printed, and no stack trace, I opted to have rethrowException=false. That caused Camel to abort the start of the context. But it keeps the process running, instead of letting it terminate. If I use rethrowException=false the process terminates as expected.

      When debugging this in Eclipse, I see that Camel get stuck in the method waitUntilCompleted() in org.apache.camel.main.MainSupport.

      I use Apache Camel 2.17.0, Camel Spring (XML), and start the process using org.apache.camel.spring.Main. When asking about this behaivor in the user mailing list, Claus Ibsen hinted that this is a bug that I should report here. Apparently the Main class doesn't handle the veto properly.

      Regards
      /Jimi

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            jimih Jimi HullegÄrd
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: