cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Grzegorz Kossakowski <>
Subject Re: Problem with map:generate, cocoon: URLs, and internal pipelines cached with ExpiresCachingProcessingPipeline
Date Sun, 13 Jan 2008 20:48:57 GMT
Peter Wyngaard pisze:
> In a previous message(s), I mentioned that I created an internal-only
> pipeline, cached with ExpiresCachingProcessingPipeline.  This pipeline
> supports many URLs that return objects from a database using SQL
> Transformer.  The caching is important, as many of the database
> operations are time consuming.
> I've built several additional pipelines that aggregate and transform the
> "raw" database XML returned by the caching internal-only pipeline.  So
> here's an abbreviated sitemap.xmap to illustrate the problem:


> When I remove the type="caching" from the internal pipeline, everything
> works great.  I can access
> http://localhost:8888/myblock/transformed-data.xml?param1={...}&param2={...}&
> <http://localhost:8888/myblock/transformed-data.xml?param1=%7b...%7d&param2=%7b...%7d&>...,
> and all is well.
> However, with the type="caching" in place, every other request for
> transformed-data.xml fails with the following exception:
> Caused by: org.apache.cocoon.ProcessingException: Serializer already
> set. Cannot set serializer 'xml'
>         at <map:serialize type="xml"> - [at the <map:serializer …> line
> in the internal-only pipeline]
> My current workaround is to replace:
> <map:generate src="cocoon:raw:/data?query_string=…" />
> with:
> <map:aggregate element="dummy">
>   <map:part src="cocoon:raw:/data?query_string=…" />
> </map:aggregate>
> <map:transform src="remove-dummy.xsl" type="saxon" />
> The remove-dummy.xsl just removes the <dummy>…</dummy> element that
> map:aggregate adds.
> Is this a bug in Cocoon 2.2 trunk?

Thanks for giving such detailed description of your problem. Looking at what you have written
looks like a bug (definitively not a feature) but it's a first time I see something like this.

Have you tried to use caching pipeline but with simpler set of components (for example by
SQLTransformer)? If the problem still persists I would suggest to make a bug report and attach
simple block showing buggy behaviour. Someone will definitively will need to have a look on
this or
at least give an advice how to track down the problem.

Grzegorz Kossakowski
Committer and PMC Member of Apache Cocoon

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

View raw message