Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.0.1
-
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.