cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Loritsch <>
Subject Re: [c2] bug in component selector?
Date Thu, 03 May 2001 20:53:34 GMT
Donald Ball wrote:
> heya. after leaving my development site overnight, i come in to get this
> error when i hit any of the urls:

Hmm.  Ok. I am going to have to alter the ThreadSafeComponentHolder a little.
Basically what is happening is that the Cocoon object was disposed of because
the servlet instance was expired by the servlet engine.  As a result, all
components have been disposed of (and all containing components disposed of
their children).

It is an error to try and obtain a component that is disposed.  What is probably
happening is that the Pipeline is holding on to a copy of a disposed component

When cocoon is rebuilt, it is supposed to rebuild the entire component architecture
along with the Cocoon object.  This lengthens the first response--but it is safe.

I will alter the ThreadSafeComponentHolder to create a new instance of the
Component if it was disposed of earlier.  Not sure how it will work out though.

In the mean time, check the references.  If a Component that is disposed of is
reused this is a bigger error.

> org.apache.cocoon.ProcessingException: Failed to execute
> pipeline.:org.apache.cocoon.ProcessingException: ContentAggregator: cannot
> process event pipeline for URI
> plain/meta:org.apache.cocoon.ProcessingException: Failed to execute
> pipeline.:org.apache.cocoon.ResourceNotFoundException: You cannot select a
> Component from a disposed
> ComponentSelector:java.lang.IllegalStateException: You cannot select a
> Component from a disposed ComponentSelector
>        at
> org.apache.cocoon.components.pipeline.CachingEventPipeline.process(
>         at
> org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(
>         at
> org.apache.cocoon.www.sitemap_xmap.process(
> the main pipeline rules are:
>    <map:match pattern="*">
>     <map:aggregate element="root">
>      <map:part src="plain/meta"/>
>      <map:part src="plain/{1}"/>
>     </map:aggregate>
>     <map:transform type="xinclude"/>
>     <map:act type="resource-exists">
>      <parameter name="url" value="context://style/{1}.xsl"/>
>      <map:transform src="style/{../1}.xsl"/>
>     </map:act>
>     <map:select>
>      <map:when test="wap">
>       <map:transform src="style/wziml-wml.xsl"/>
>       <mal:serialize type="wap"/>
>      </map:when>
>      <map:otherwise>
>       <map:transform src="style/wziml-html.xsl"/>
>       <map:serialize type="html"/>
>      </map:otherwise>
>     </map:select>
>    </map:match>
>    <map:match pattern="plain/*">
>     <map:generate src="content/{1}.xml" type="serverpages"/>
>    </map:match>
> using the caching pipeline components and the null sax connector.
> restarting catalina fixed the problem, of course.
> - donald
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, email:

To unsubscribe, e-mail:
For additional commands, email:

View raw message