Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-723

Exception bypassing on JSF conversion errors

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.0.1
    • 1.0.3
    • None
    • None

    Description

      org.apache.deltaspike.jsf.impl.injection.proxy.DelegatingMethodHandler is not catching java.lang.reflect.InvocationTargetException from method invocations causing any kind of exceptions from converters and validators being thrown wrapped in InvocationTargetException.

      Especially when in comes to conversion this will cause javax.faces.component.UIInput.validate(FacesContext) fail to catch javax.faces.convert.ConverterException from any converters.

      To make things worse (and me scratching my head for several hours while trying to find out, how this "ConverterException" can bypass the before mentioned catch block from UIInput) BridgeExceptionHandlerWrapper returned by DeltaSpikeFacesContextWrapper is unfortunately only returning the unwrapped ConverterException to the application, so any trace of this catch block bypassing is cleaned up and therefore perfectly hidden from the application.

      To sum up: Current deltaspike releases > 1.0.0 are causing JSF based applications to fail on conversion errors, making these releases unusable.

      Possible solution: Catching the InvocationTargetException in DelegatingMethodHandler and rethrowing it's target exception will probably do the job, but as I peeked into the code MethodHandlerProxy and DelegatingMethodHandler seem to be a temporary solution, so maybe there is already another solution for this problem.

      Attachments

        Activity

          People

            Unassigned Unassigned
            tzwoenn Sven Linstaedt
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: