cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hunsberger, Peter" <>
Subject Does exception selector not work with flow?
Date Tue, 13 Jan 2004 19:48:08 GMT
Can anyone see a reason why the exception selector wouldn't work with
flow?  In particular, we throw a BadSessionException and use a selector
like the following:

            <map:selector logger="sitemap.selector.exception"
name="exception" src="org.apache.cocoon.selection.ExceptionSelector">
class="org.apache.cocoon.ResourceNotFoundException" name="not-found"/>
                <exception class="org.stjude.ct.ui.BadSessionException"
class="org.stjude.ct.ui.MissingMetaDataException" name="not-found"/>
                <exception class="java.lang.Throwable" unroll="true"/>

for a session timeout. When a timeout does occur we see the
BadSesionException reported in the error.log.  We attempt to pick it up
in a handle-errors section thusly:

                <map:select type="exception">
                  <map:when test="not-found">
                    <map:generate type="notifying"/>
                    <map:transform src="stylesheets/notFound.xsl"/>
                    <map:serialize status-code="404"/>
                  <map:when test="invalid-session">
                    <map:generate type="notifying"/>
                    <map:serialize status-code="200"/>
                    <map:generate type="notifying"/>
                    <map:transform src="stylesheets/systemError.xsl"/>
                    <map:serialize status-code="500"/>

This was working fine before we started converting things to flow, now,
however, I do not see an entry in the handled-errors.log and I get a
status 500 screen from Tomcat saying Internal Server Error.  Really the
only difference is that we have an outstanding continuation at the time
this happens, but the problem shows up wither I do a GET (for another
page) or a POST to the page with the continuation.  I thought perhaps
one could not have two exceptions using the same name  in the selector
(not-found) but removing one makes no difference in the behavior.  Any
other thoughts as to what we should be looking for?

Peter Hunsberger

View raw message