You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by bu...@apache.org on 2002/07/29 22:02:25 UTC

DO NOT REPLY [Bug 11260] New: - Sitemap components are inaccessible from mounted sub-sitemaps using interpreted engine.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11260>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=11260

Sitemap components are inaccessible from mounted sub-sitemaps using interpreted engine.

           Summary: Sitemap components are inaccessible from mounted sub-
                    sitemaps using interpreted engine.
           Product: Cocoon 2
           Version: 2.0.3
          Platform: Alpha
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: sitemap components
        AssignedTo: cocoon-dev@xml.apache.org
        ReportedBy: whitcomb@zk3.dec.com


When using the interpreted sitemap engine (TreeProcessor), sitemap components
(generators, transformers, serializers, etc) defined in a parent sitemap are
undefined and inaccessible from any mounted sub-sitemaps.  

My setup:  Cocoon 2.0.3, Tomcat 4.0.4b and Apache 1.3.26 using WARP connector on
Tru64 Unix V5.1A.

Using the cocoon webapp from the binary distribution or aftering building from
source (no customizations made to standard build) and after changing the sitemap
engine in cocoon.xconf to use the interpreted engine (no other customizations
made), accessing any page within the samples subdir (ie,
/cocoon/samples/welcome) produces an error.  The problem can also be seen by
using a minimized version of the samples provided with cocoon, using the
following sitemaps.  

Example:
Main sitemap contains (sitemap.xmap):
	<?xml version="1.0" encoding="UTF-8"?>
	<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 	    <map:components>
  		<map:generators default="file">
    		    <map:generator name="file" src="org.apache.cocoon.generation.FileGenerator"/>
  		</map:generators>

  		<map:transformers default="xslt">
    		    <map:transformer name="xslt"
src="org.apache.cocoon.transformation.TraxTransformer"/>
  		</map:transformers>

  		<map:serializers default="html">
    		    <map:serializer mime-type="text/html" name="html"
src="org.apache.cocoon.serialization.HTMLSerializer"/>
  		</map:serializers>

  		<map:matchers default="wildcard">
    		    <map:matcher name="wildcard"
src="org.apache.cocoon.matching.WildcardURIMatcher"/>
  		</map:matchers>
 	    </map:components>

 	    <map:pipelines>
  		<map:pipeline>
    		    <map:match pattern="samples/**">
      			<map:mount check-reload="yes" src="samples/" uri-prefix="samples"/>
    		    </map:match>
		</map:pipeline>
 	    </map:pipelines>
	</map:sitemap><!-- end of file -->

Subsitemap (samples/sitemap.xmap):
	<?xml version="1.0"?>
	<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0">
 	    <map:components>
  		<map:matchers default="wildcard"/>
  		<map:generators default="file"/>
  		<map:transformers default="xslt"/>
  		<map:serializers default="html"/>
 	    </map:components>

 	    <map:pipelines>
  		<map:pipeline>
   		    <map:match pattern="welcome">
    			<map:generate src="samples.xml"/>
    			<map:transform src="common/style/xsl/html/simple-samples2html.xsl"/>
    			<map:serialize/>
   		    </map:match>
  		</map:pipeline>
 	    </map:pipelines>
	</map:sitemap><!--end of file -->

Then when accessing the URI /cocoon/samples/welcome I get the error and stacktrace:

org.apache.avalon.framework.configuration.ConfigurationException: Type
'wildcard' is not defined for 'match' at
file:/var/data/web/tomcat/webapps/cocoon/samples/sitemap.xmap:15:33
        at
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.getTypeForStatement
(DefaultTreeBuilder.java:555) (pc 255)
        at
org.apache.cocoon.components.treeprocessor.sitemap.MatchNodeBuilder.buildNode
(MatchNodeBuilder.java:94) (pc 17)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNodeBuilder.buildNode
(PipelineNodeBuilder.java:122) (pc 283)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder.buildChildNodesList
(AbstractParentProcessingNodeBuilder.java:156) (pc 54)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder.buildChildNodes
(AbstractParentProcessingNodeBuilder.java:172) (pc 2)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNodeBuilder.buildNode
(PipelinesNodeBuilder.java:73) (pc 31)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder.buildChildNodesList
(AbstractParentProcessingNodeBuilder.java:156) (pc 54)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNodeBuilder.buildChildNodes
(AbstractParentProcessingNodeBuilder.java:172) (pc 2)
        at
org.apache.cocoon.components.treeprocessor.sitemap.SitemapNodeBuilder.buildNode
(SitemapNodeBuilder.java:76) (pc 2)
        at
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.createTree
(DefaultTreeBuilder.java:358) (pc 8)
        at
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(org.apache.avalon.framework.configuration.Configuration)
(DefaultTreeBuilder.java:426) (pc 64)
        at
org.apache.cocoon.components.treeprocessor.DefaultTreeBuilder.build(org.apache.cocoon.environment.Source)
(DefaultTreeBuilder.java:389) (pc 22)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.setupRootNode
(TreeProcessor.java:362) (pc 119)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(org.apache.cocoon.environment.Environment,org.apache.cocoon.components.treeprocessor.InvokeContext)
(TreeProcessor.java:326) (pc 53)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(org.apache.cocoon.environment.Environment)
(TreeProcessor.java:293) (pc 19)
        at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke
(MountNode.java:131) (pc 113)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(org.apache.cocoon.components.treeprocessor.ProcessingNode[],org.apache.cocoon.environment.Environment,org.apache.cocoon.components.treeprocessor.InvokeContext,java.util.Map)
(AbstractParentProcessingNode.java:85) (pc 18)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke
(PreparableMatchNode.java:156) (pc 191)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(org.apache.cocoon.components.treeprocessor.ProcessingNode[],org.apache.cocoon.environment.Environment,org.apache.cocoon.components.treeprocessor.InvokeContext)
(AbstractParentProcessingNode.java:109) (pc 12)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke
(PipelineNode.java:140) (pc 23)
        at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(org.apache.cocoon.components.treeprocessor.ProcessingNode[],org.apache.cocoon.environment.Environment,org.apache.cocoon.components.treeprocessor.InvokeContext)
(AbstractParentProcessingNode.java:109) (pc 12)
        at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke
(PipelinesNode.java:144) (pc 118)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(org.apache.cocoon.environment.Environment,org.apache.cocoon.components.treeprocessor.InvokeContext)
(TreeProcessor.java:328) (pc 62)
        at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(org.apache.cocoon.environment.Environment)
(TreeProcessor.java:293) (pc 19)
        at
org.apache.cocoon.Cocoon.process(org.apache.cocoon.environment.Environment)
(Cocoon.java:575) (pc 57)
        at org.apache.cocoon.servlet.CocoonServlet.service
(CocoonServlet.java:999) (pc 474)
        at
javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest,javax.servlet.ServletResponse)
(HttpServlet.java:853) (pc 30)
        ... rest was catalina/tomcat part of trace

According to the documentation and behavior of Cocoon 2.0.2 and the compiled
sitemap engine in 2.0.3, all the components from the parent should still be
accessible by name within the child sitemap.  In practice this is broken.  

I've tried tracing the problem in the source code and the closest I can find to
an answer is in a cvs log message in the avalon-excalibur source file
ExcaliburComponentSelector.java (Rev. 1.4.2.4),
http://cvs.apache.org/viewcvs.cgi/jakarta-avalon-excalibur/component/src/java/org/apache/avalon/excalibur/component/ExcaliburComponentSelector.java,
mentioning that the change for that revision would break Cocoon subsitemaps.

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org