MyFaces swallows SystemEvent containing validation exception

I am using Apache MyFaces 2.2.11 for my JSF web application (using PrimeFaces).

During phase PROCESS_VALIDATIONS(3)

ProcessValidationsExecutor

outputs a ContextAwarePropertyNotFoundException

, protozoal PropertyNotFoundException

(javax.el.PropertyNotFoundException: Target Unreachable, 'recipientAddress ', return null) within executePhase()

. Then the exception is thrown and thrown publishException()

. This calls the publishEvent()

class method ApplicationImpl

.

However, when trying to find SystemListenerEntry

, the one responsible for posting the event was not found. systemEventClass

at this point ExceptionQueuedEvent . However, _systemEventListenerClassMap

there is no entry for this key .

Maps contain only entries for:

  • javax.faces.event.PreDestroyApplicationEvent
  • javax.faces.event.PostConstructApplicationEvent
  • javax.faces.event.PreRenderComponentEvent
  • javax.faces.event.PreDestroyCustomScopeEvent
  • javax.faces.event.PreDestroyViewMapEvent
  • javax.faces.event.PostAddToViewEvent
  • javax.faces.event.PostValidateEvent

Without looking up, the SystemListenerEntry

method publishEvent()

just returns and the exception is swallowed / lost. As a result, validation errors are not presented or even logged and the action method in my bean view is not called without receiving feedback.

What ideas might come up?

EDIT: Using Mojarra, an exception is logged. Three times even!

17-May-2017 14:44:23.936 INFO [http-nio-8443-exec-5] com.sun.faces.context.PartialViewContextImpl.processPartial javax.el.PropertyNotFoundException: /views/panels/editable_address.xhtml @50,65 value="#{viewBean.shippingRequest.recipientAddress.contactPartner}": Target Unreachable, 'recipientAddress' returned null

17-May-2017 14:44:23.938 WARNING [http-nio-8443-exec-5] com.sun.faces.lifecycle.ProcessValidationsPhase.execute javax.el.PropertyNotFoundException: /views/panels/editable_address.xhtml @50,65 value="#{viewBean.shippingRequest.recipientAddress.contactPartner}": Target Unreachable, 'recipientAddress' returned null

17-May-2017 14:44:23.947 SEVERE [http-nio-8443-exec-5] com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError javax.el.PropertyNotFoundException: /views/panels/editable_address.xhtml @50,65 value="#{viewBean.shippingRequest.recipientAddress.contactPartner}": Target Unreachable, 'recipientAddress' returned null

      

+3


source to share





All Articles