[jbossseam-issues] [JBoss JIRA] Updated: (JBSEAM-2217) A single wrong <exception> entry in pages.xml causes all exception handler getting dropped

Norman Richards (JIRA) jira-events at lists.jboss.org
Wed Nov 7 13:48:46 EST 2007


     [ http://jira.jboss.com/jira/browse/JBSEAM-2217?page=all ]

Norman Richards updated JBSEAM-2217:
------------------------------------

    Fix Version/s: 2.0.1.GA

> 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
>             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: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the seam-issues mailing list