Corrupted XML content with cocoon: protocol and caching
-------------------------------------------------------
Key: COCOON-2139
URL: https://issues.apache.org/jira/browse/COCOON-2139
Project: Cocoon
Issue Type: Bug
Components: * Cocoon Core
Affects Versions: 2.1.9
Reporter: Igor Naumov
I ran into a very tricky and frustrating issue with caching pipelines using
cocoon: protocol.
It appears that when a result of a pipeline is retrieved from cache, the XML is
"corrupted" in a strange way (e.g. attributes have random values they are not
expected to have).
I am using Cocoon 2.1.9 under Jetty (local server), with Saxon 8. Other
components used in the sample setup are ExpiresCachingProcessingPipeline and
XInclude.
The test case is set up as follows (I will attach all the files or provide a
link to download):
1. A caching pipeline (using ExpiresCachingProcessingPipeline) returns a fairly
large XML document straight from a local file.
2. Another pipeline (noncaching) is using XInclude to embed a result of the
pipeline #1 (through cocoon: URL) into the result document.
3. A simple XSL filter is applied at the end of pipeline #2 to show the damaged
XML elements.
When the pipeline #2 is called for the first time, everything works ok. At this
time pipeline #1 result is cached.
When the pipeline #2 is called for the second time, the XML returned by cocoon:
URL is different from the first call - some attributes are changed with a
random data which seems to come form other places in the stream (like element
names).
XInclude may not be the primary suspect, I tried CInclude with similar effects.
Disabling caching on pipeline #1 seems to eliminate the problem, changing
cocoon: protocol to http: seems to fix it as well.
The most frustrating part is that although the bug can be reproduced reliably
with particular sitemap and source files, the actual effect seems to depend on
the source XML (less likely to occur with smaller initial data sets).
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.