Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-9481

ValidationException is not thrown when EndpointValidation fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • fuse-7.3
    • fuse-7.1
    • Camel
    • None
    • % %
    • Fuse 7.3 Sprint 40 - Dev #1

      EndpointValidation does not work. See attached reproducer.

      My analysis:
      1) ValidationException is thrown in https://github.com/jboss-fuse/camel/blob/master/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java#L164
      2) The exception is caught in https://github.com/jboss-fuse/camel/blob/master/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatingProcessor.java#L91 and is set as Exchange exception.

      The main problem is that the exception is set on new Exchange created in https://github.com/jboss-fuse/camel/blob/master/camel-core/src/main/java/org/apache/camel/impl/validator/ProcessorValidator.java#L58-L62

      No Exception is thrown because is caught (2), no exception is set on original exception.

            acosenti Andrea Cosentino
            jbouska@redhat.com Jan Bouska
            Jan Bouska Jan Bouska
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: