[
http://jira.jboss.com/jira/browse/JBSEAM-2597?page=all ]
Christian Bauer reopened JBSEAM-2597:
-------------------------------------
I can't reproduce the issue Pete mentioned, Facelets does not swallow an exception on
rendered="{bindingThrowsException}", at least not during a regular GET request.
However, the JSF RI + Seam swallow exceptions in two other situations:
1. Exception on POSTback thrown in UPDATE MODEL in a value-binding setter. This is
converted, without messages in the log, to a JSF validation error message that says
"Error writing 'formContent' on type
org.jboss.seam.wiki.core.action.DocumentHome_$$_javassist_29". No stacktrace or other
hint in the log.
2. Exception on POSTback from an Ajax4JSF request thrown in UPDATE MODEL in a value
binding setter. This is also converted, but if you do not reRender the message section of
your page, nothing will appear on the page but this in the log: INFO
[javax.enterprise.resource.webcontainer.jsf.lifecycle] WARNING: FacesMessage(s) have been
enqueued, but may not have been displayed.
sourceId=docEditForm:previewSwitch[severity=(ERROR 2), summary=(/docEdit_d.xhtml @191,158
value="#{documentHome.enabledPreview}": Error writing 'enabledPreview'
on type org.jboss.seam.wiki.core.action.DocumentHome_$$_javassist_20),
detail=(/docEdit_d.xhtml @191,158 value="#{documentHome.enabledPreview}": Error
writing 'enabledPreview' on type
org.jboss.seam.wiki.core.action.DocumentHome_$$_javassist_20)]
Obviously 1. and 2. are connected, so this is, as hinted in the original issue summary,
about JSF swallowing exceptions in UPDATE MODEL and converting them into weak message that
might be displayed in different places.
Now, I don't know why the JSF RI authors decided that a RuntimeException can be
ignored and that processing can continue after the UPDATE MODEL phase clearly failed. Even
if we can't do anything about this in Seam, we should leave this issue open until this
is resolved in one way or another.
Note: I've already updated Seam with Petes new JDK/log4j logging bridge, so that INFO
message that says "WARNING" is just... wrong.
Exception handling - JSF swallows exceptions in certain phases
--------------------------------------------------------------
Key: JBSEAM-2597
URL:
http://jira.jboss.com/jira/browse/JBSEAM-2597
Project: JBoss Seam
Issue Type: Feature Request
Components: Core
Reporter: Shane Bryzak
Fix For: 2.1.0.GA
I can't reproduce this right now but I'm sure I spent several hours
with a debugger only to find out that I had a typo in a value binding
and that the exception was completely swallowed during an early JSF
phase (UPDATE MODEL probably). There was nothing in the log, the
action phase just never executed. This is a major issue (obviously)
for another subtle reason: Beginners have trouble understanding the
JSF lifecycle and processing phases - I know I did. You begin to hate
JSf when you don't understand why a certain phase does not execute.
I'd start reproducing it by generating an NPE in a value binding
setter, that should do it.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira