]
Norman Richards closed JBSEAM-2217.
-----------------------------------
Resolution: Done
Assignee: Norman Richards
Fixed. Thanks.
A single wrong <exception> entry in pages.xml causes all
exception handler getting dropped
------------------------------------------------------------------------------------------
Key: JBSEAM-2217
URL:
http://jira.jboss.com/jira/browse/JBSEAM-2217
Project: JBoss Seam
Issue Type: Bug
Components: Framework
Affects Versions: 2.0.0.GA
Reporter: Werner Kolov
Assigned To: Norman Richards
Fix For: 2.0.1.GA
Try to add following 3 entries to your pages.xml
<page view-id="/restricted.xhtml" login-required="true">
<restrict>#{s:hasRole('doesNotExist')}</restrict>
</page>
<exception class="org.jboss.seam.security.AuthorizationException">
<redirect view-id="/home.xhtml">
<message>You don't have permission to do this</message>
</redirect>
</exception>
<exception class="org.jboss.seam.TransactionException">
<end-conversation/>
<redirect view-id="/exceptions.xhtml">
<message>#{messages.seam_specific_exception}</message>
</redirect>
</exception>
You will never be redirected to /home.xhtml after an AuthorizationException, because the
exception class org.jboss.seam.TransactionException does not exist (any more) in Seam 2.0.
Sure, this is a configuration error, but unfortunately you are not prompted about it
during the parsing of pages.xml. The parser simply drops ALL exception handlers, if one of
them is wrong, so the complete custom exception handling and all <restrict> tags
don't work. This error can easily happen, if you migrate from one Seam version (1.2.1)
to another (2.0.0) and some exception classes change.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: