MyFaces吞下包含验证异常

时间:2017-05-17 11:21:56

标签: jsf jsf-2.2 myfaces

我正在使用Apache MyFaces 2.2.11作为我的JSF Web应用程序(使用PrimeFaces)。

PROCESS_VALIDATIONS(3)阶段,ProcessValidationsExecutor引发由ContextAwarePropertyNotFoundException 引起的PropertyNotFoundException(javax.el.PropertyNotFoundException:Target Unreachable,'recipientAddress} executePhase()期间'返回null)。然后捕获异常并调用publishException()。这会调用publishEvent()类的ApplicationImpl方法。

但是,在尝试查找负责发布事件的SystemListenerEntry时,找不到任何内容。此时systemEventClass ExceptionQueuedEvent 。但是,_systemEventListenerClassMap中没有该密钥的输入。

地图仅包含以下条目:

  • 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

如果没有找到SystemListenerEntry publishEvent()方法,则只返回并且异常被吞没/丢失。因此,在没有得到任何反馈的情况下,不会显示甚至记录验证错误,也不会调用视图bean中的操作方法。

任何想法可能是什么问题?

修改 使用Mojarra,记录异常。甚至三次!

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

0 个答案:

没有答案