You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Jochen Kuhnle <li...@kuhnle.net> on 2005/07/11 09:56:27 UTC
Exception in AbstractProcessingPipeline.release
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)
The component here being the processing pipeline. This happens because
InvokeContext.getProcessingPipeline adds the pipeline conditionally:
if (this.isBuildingPipelineOnly) {
CocoonComponentManager.addComponentForAutomaticRelease(this.pipelineSelector,
this.processingPipeline, this.pipelinesManager);
}
Wheras AbstractProcessingPipeline removes itself unconditionally:
public void release() {
try {
CocoonComponentManager.removeFromAutomaticRelease(this);
} catch (ProcessingException e) {
...
}
}
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?
Regards,
Jochen
Re: Exception in AbstractProcessingPipeline.release
Posted by Jochen Kuhnle <li...@kuhnle.net>.
Carsten Ziegeler <cz...@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
Re: Exception in AbstractProcessingPipeline.release
Posted by Carsten Ziegeler <cz...@apache.org>.
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)
>
> The component here being the processing pipeline. This happens because
> InvokeContext.getProcessingPipeline adds the pipeline conditionally:
>
> if (this.isBuildingPipelineOnly) {
>
> CocoonComponentManager.addComponentForAutomaticRelease(this.pipelineSelector,
> this.processingPipeline, this.pipelinesManager);
> }
>
> Wheras AbstractProcessingPipeline removes itself unconditionally:
>
> public void release() {
> try {
> CocoonComponentManager.removeFromAutomaticRelease(this);
> } catch (ProcessingException e) {
> ...
> }
> }
>
> 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?
Yes, this stuff is only used for the pipelines, we removed it completly
in 2.2 and use a cleaner solution there.
Carsten
--
Carsten Ziegeler - Open Source Group, S&N AG
http://www.s-und-n.de
http://www.osoco.org/weblogs/rael/