Reinhard Poetz wrote:
Grzegorz Kossakowski wrote:
Reinhard Poetz wrote:
When I was testing one of my projects with the latest version of
trunk, I run across some obscure behaviour, when I use the exception
generator: The problem is that it only works every second request.

When it fails, following exception is thrown:

Caused by: org.apache.cocoon.ProcessingException: Generator already
set. Cannot set genera
tor 'exception'
        at <map:generate type="exception"> -
file:///F:/os/cocoon/trunk/blocks/cocoon-it/.
/src/main/resources/COB-INF/sitemap.xmap:211:43
        at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.setGenerator(A

bstractProcessingPipeline.java:205)

Any clue why this happens?
Can you fill the issue and add the test-case for this? I've experienced
such errors while working on Micro Cocoon and the reason always has been
the same: not properly cleaned up environment (due to various reasons
like wrong scope, or sth like this).

Done. See https://issues.apache.org/jira/browse/COCOON-2179.

I think this bug should be fixed for the release, hence I set the issue's priority to 'blocker'.

Looking at the currently failing integration tests I think that we really have a problem with the environment cleanup:

-------------------------------------------------------------------------------
Test set: org.apache.cocoon.it.servletservice.SubSitemaps
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.51 sec <<< FAILURE! testSimplePipelineFromSubSitemap(org.apache.cocoon.it.servletservice.SubSitemaps) Time elapsed: 0.45 sec <<< ERROR! com.gargoylesoftware.htmlunit.FailingHttpStatusCodeException: 500 Generator already set. Cannot set generator 'file' at <map:generate> - /blocks/cocoon-servlet-service-sample/test1/sub/sitemap.xmap:26:39 at <map:match> - /blocks/cocoon-servlet-service-sample/test1/sub/sitemap.xmap:25:33 at <map:mount> - /blocks/cocoon-servlet-service-sample/test1/sitemap.xmap:83:49 at <map:match> - /blocks/cocoon-servlet-service-sample/test1/sitemap.xmap:82:35 for http://localhost:8888/cocoon-servlet-service-sample1/sub/test
        at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:346)


This only happens when I run the integrationt tests but not when I access the URL directly with a browser :-/

--
Reinhard Pötz                            Managing Director, {Indoqa} GmbH
                          http://www.indoqa.com/en/people/reinhard.poetz/

Member of the Apache Software Foundation
Apache Cocoon Committer, PMC member, PMC Chair        [EMAIL PROTECTED]
_________________________________________________________________________

Reply via email to