cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jochen Kuhnle <li...@kuhnle.net>
Subject Re: Exception in AbstractProcessingPipeline.release
Date Wed, 13 Jul 2005 12:35:43 GMT
Carsten Ziegeler <cziegeler@apache.org> wrote on 13.07.2005 09:01:37:

> Jochen Kuhnle wrote:
> > Hi,
> > 
> > I get the following Exception when Cocoon processes a request:
> > 
> > org.apache.cocoon.ProcessingException: Unable to remove component from 

> > automatic release: component not found.
> >         at 
> > org.apache.cocoon.components.EnvironmentDescription.
> removeFromAutoRelease(CocoonComponentManager.java:789)
> > 

...

> > 
> > Since the Exception occurs with each request, this wastes valuable log 

> > space ;) So I would like to fix this. The question is, how? The hack 
> > solution would be to not log the exception. The better solution would 
be 
> > to somehow tell AbstractProcessingPipeline if it has to call 
> > removeFromAutomaticRelease.
> > 
> > But.. Upon digging deeper... This whole automatic release stuff is 
used 
> > only once in all of Cocoon -- for the ProcessingPipeline. So maybe 
there 
> > is a way to get rid of it completely? Any suggestions?
> > 
> Hmm, I don't get these exceptions - can you point to an example?

Ahemm... Blush... This happens when you use generated sitemaps (map:mount 
with cocoon: protocol). I know I'm not supposed to, please don't tell 
Stefano ;). I guess the pipeline stuff gets nested in an "unusual" way, 
because SitemapSource.refresh accesses the pipeline code. But IMO it still 
is a bug, it just doesn't occur usually.

To reproduce, you just have to generate the sitemaps.

<map:match pattern="**/sitemap.xmap">
  <map:read src="{1}/sitemap.xmap"/>
</map:match>

This should suffice. In practice, the generation ivolves some XSLT's, 
though. You then have to mount the sitemap:

<map:match pattern="*/**">
  <map:mount check-reload="yes" 
src="cocoon:raw://{1}/sitemap.xmap?cocoon-view=" uri-prefix="{1}" 
context="{1}/"/>
</map:match>

NB: This code uses the mount-context patch from [1]

> Yes, this stuff is only used for the pipelines, we removed it completly
> in 2.2 and use a cleaner solution there.
> 
> Carsten
> 

Regards,
Jochen

[1] http://issues.apache.org/bugzilla/show_bug.cgi?id=34781



Mime
View raw message