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

MainSupport - Should not barf if no CamelContext found

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 2.13.0
    • 2.13.1, 2.14.0
    • camel-core, camel-spring
    • None
    • Unknown

    Description

      For example if you have multiple spring xml files, and one of them do not contain a <camelContext> then we may have MainSupport in camel-core barf. We should make that optional.

      Exception in thread "main" org.apache.camel.CamelException: Cannot find any Camel Context from the Application Context. Please check your Application Context setting
      	at org.apache.camel.main.MainSupport.postProcessContext(MainSupport.java:397)
      	at org.apache.camel.spring.Main.doStart(Main.java:146)
      	at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
      	at org.apache.camel.main.MainSupport.run(MainSupport.java:148)
      	at org.apache.camel.main.MainSupport.run(MainSupport.java:352)
      	at org.apache.camel.spring.Main.main(Main.java:74)
      [                      Thread-4] MainSupport$HangupInterceptor  INFO  Received hang up - stopping the main instance.
      

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            davsclaus Claus Ibsen
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: