You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "beyanet.com" <be...@yahoo.co.uk> on 2005/04/21 16:26:37 UTC

Invalid continuation ID error trapping problem

Ok,
so I have the following in my sitemap:

    <map:selector logger="sitemap.selector.exception" name="exception" 
src="org.apache.cocoon.selection.ExceptionSelector">
      <exception class="org.apache.cocoon.ResourceNotFoundException" 
name="not-found"/>
      <exception 
class="org.apache.cocoon.components.flow.InvalidContinuationException" 
name="invalid-continuation"/>
      <exception class="java.lang.Throwable" unroll="true"/>
    </map:selector>


			<map:match pattern="invalidContinuation">
				<map:redirect-to uri="login.xml"/>
			</map:match>

		   <map:handle-errors>
		       <map:select type="exception">
		           <map:when test="invalid-continuation">
		               <map:redirect-to uri="login.xml"/>
		           </map:when>
		       </map:select>
		   </map:handle-errors>

The user is on a page for which the session has ended and they try to 
refresh a page which holds and expired continuation ID. The above 
should trap this and redirect the user to the login.xml pipe right? 
This is not happening in my case as I get the following error message:

cause: 
org.apache.cocoon.components.flow.InvalidContinuationException: The 
continuation ID 3a86845140187e14292136292b5578471b10570c is invalid.

Why is the error not being trapped? What am I missing here?

regards

Uzo

Re: Invalid continuation ID error trapping problem

Posted by uzo <an...@jibeya.com>.
>>Ok,
>>so I have the following in my sitemap:
>>
>>    <map:selector logger="sitemap.selector.exception" 
>>name="exception" 
>>src="org.apache.cocoon.selection.ExceptionSelector">
>>      <exception class="org.apache.cocoon.ResourceNotFoundException" 
>>name="not-found"/>
>>      <exception 
>>class="org.apache.cocoon.components.flow.InvalidContinuationException" 
>>name="invalid-continuation"/>
>>      <exception class="java.lang.Throwable" unroll="true"/>
>>    </map:selector>
>>
>>
>>			<map:match pattern="invalidContinuation">
>>				<map:redirect-to uri="login.xml"/>
>>			</map:match>
>>
>>		   <map:handle-errors>
>>		       <map:select type="exception">
>>		           <map:when test="invalid-continuation">
>>		               <map:redirect-to uri="login.xml"/>
>>		           </map:when>
>>		       </map:select>
>>		   </map:handle-errors>
>>
>>The user is on a page for which the session has ended and they try 
>>to refresh a page which holds and expired continuation ID. The 
>>above should trap this and redirect the user to the login.xml pipe 
>>right? This is not happening in my case as I get the following 
>>error message:
>>
>>cause: 
>>org.apache.cocoon.components.flow.InvalidContinuationException: The 
>>continuation ID 3a86845140187e14292136292b5578471b10570c is invalid.
>>
>>Why is the error not being trapped? What am I missing here?
>>
>>regards
>>
>>Uzo
>
>Ok,
>I have amended my code and still no joy:
>
>    <map:selector logger="sitemap.selector.exception" 
>name="exception" src="org.apache.cocoon.selection.ExceptionSelector">
>      <exception class="org.apache.cocoon.ResourceNotFoundException" 
>name="not-found"/>
>      <exception 
>class="org.apache.cocoon.components.flow.InvalidContinuationException" 
>name="invalid-continuation"/>
>      <exception class="java.lang.Throwable" unroll="true"/>
>    </map:selector>
>
>.....
>
>			<map:handle-errors>
>		      <map:select type="exception">
>		        <map:when test="invalid-continuation">
>		          <map:generate 
>src="documents/invalidContinuation.html"/>
>		          <map:serialize type="xhtml"/>
>		        </map:when>
>		        <map:when test="not-found">
>		          <map:generate src="error-giving-page.html"/>
>		          <map:serialize type="xhtml"/>
>		        </map:when>
>		      </map:select>
>		    </map:handle-errors> 
>
>   </map:pipeline>
>
>But whenever I have an expired continuation id or I place a request 
>for a file/pipe that doesn't exist the above error handling does not 
>happen. Why? I am using cocoon 2.1.7 on OS X.
>
>regards
>
>Uzo


Anybody have any ideas about this?

Uzo


Re: Invalid continuation ID error trapping problem

Posted by "beyanet.com" <be...@yahoo.co.uk>.
>Ok,
>so I have the following in my sitemap:
>
>    <map:selector logger="sitemap.selector.exception" 
>name="exception" src="org.apache.cocoon.selection.ExceptionSelector">
>      <exception class="org.apache.cocoon.ResourceNotFoundException" 
>name="not-found"/>
>      <exception 
>class="org.apache.cocoon.components.flow.InvalidContinuationException" 
>name="invalid-continuation"/>
>      <exception class="java.lang.Throwable" unroll="true"/>
>    </map:selector>
>
>
>			<map:match pattern="invalidContinuation">
>				<map:redirect-to uri="login.xml"/>
>			</map:match>
>
>		   <map:handle-errors>
>		       <map:select type="exception">
>		           <map:when test="invalid-continuation">
>		               <map:redirect-to uri="login.xml"/>
>		           </map:when>
>		       </map:select>
>		   </map:handle-errors>
>
>The user is on a page for which the session has ended and they try 
>to refresh a page which holds and expired continuation ID. The above 
>should trap this and redirect the user to the login.xml pipe right? 
>This is not happening in my case as I get the following error 
>message:
>
>cause: 
>org.apache.cocoon.components.flow.InvalidContinuationException: The 
>continuation ID 3a86845140187e14292136292b5578471b10570c is invalid.
>
>Why is the error not being trapped? What am I missing here?
>
>regards
>
>Uzo

Ok,
I have amended my code and still no joy:

    <map:selector logger="sitemap.selector.exception" name="exception" 
src="org.apache.cocoon.selection.ExceptionSelector">
      <exception class="org.apache.cocoon.ResourceNotFoundException" 
name="not-found"/>
      <exception 
class="org.apache.cocoon.components.flow.InvalidContinuationException" 
name="invalid-continuation"/>
      <exception class="java.lang.Throwable" unroll="true"/>
    </map:selector>

.....

			<map:handle-errors>
		      <map:select type="exception">
		        <map:when test="invalid-continuation">
		          <map:generate 
src="documents/invalidContinuation.html"/>
		          <map:serialize type="xhtml"/>
		        </map:when>
		        <map:when test="not-found">
		          <map:generate src="error-giving-page.html"/>
		          <map:serialize type="xhtml"/>
		        </map:when>
		      </map:select>
		    </map:handle-errors> 

   </map:pipeline>

But whenever I have an expired continuation id or I place a request 
for a file/pipe that doesn't exist the above error handling does not 
happen. Why? I am using cocoon 2.1.7 on OS X.

regards

Uzo