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

Ref component should throw exception if bean not found in registry

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 2.7.3, 2.8.0
    • camel-core
    • None

    Description

      When you use the ref component and you refer to a non existing endpoint, then it silently returns null, causing Camel to fail with a different error saying the ref component cannot be found

      Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: ref://xxx due to: No component found with scheme: ref

      It should use mandatoryLookup, and those methods should throw NoSuchBeanException instead of IllegalArgumentException as they currently does. Then the failure message is much more precise.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: