cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gianugo Rabellino <gian...@gmail.com>
Subject cocoon:// protocol and map:mount
Date Mon, 21 Mar 2005 11:57:59 GMT
OK, I'm doing something highly unortodox but believe me, I have a good
reason for it. :-)

The application we're developing ATM could really use some dynamic
generation of sitemaps (no, I'm not talking about
dynamic-per-request-and-conditional stuff: what I need is a sort of
macro system generating a whole sitemap out of a very simplified
configuration file). However, if I try this:

            <map:match pattern="mymaps/**">
                <map:mount src="cocoon:/generate-mymaps-sitemap/{1}"
                uri-prefix="mymaps/{1}" check-reloads="true"/>
            </map:match>

I'm hit by a of java.lang.StackOverflowError, with some bus errors(!)
popping up here and there. This is a  relevant stacktrace pattern,
which gets repeated over and over (no wonder stack overflows):

        at org.apache.cocoon.components.source.impl.SitemapSourceFactory.getSource(SitemapSourceFactory.java:64)
        at org.apache.excalibur.source.impl.SourceResolverImpl.resolveURI(SourceResolverImpl.java:208)
        at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:536)
        at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:536)
        at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:536)
        at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:536)
        at org.apache.cocoon.components.CocoonComponentManager.resolveURI(CocoonComponentManager.java:519)
        at org.apache.cocoon.environment.AbstractEnvironment.initComponents(AbstractEnvironment.java:569)
        at org.apache.cocoon.environment.wrapper.EnvironmentWrapper.setURI(EnvironmentWrapper.java:412)
        at org.apache.cocoon.components.source.impl.SitemapSource.<init>(SitemapSource.java:197)

Now, either:

1. using cocoon:// in map:mounts should be disallowed at all, which
means there should be a test somewhere in treeprocessor explicitly
forbidding that;

or

2. there is a bug :-)

or

3. I'm the stupidest dumbass ever, and I did some silly mistake.
However, if dump the generated sitemap and mount that one, everything
just works, so the generated sitemap syntax should be fine.

Any pointers on where to start looking?

-- 
Gianugo Rabellino
Pro-netics s.r.l. -  http://www.pro-netics.com
Orixo, the XML business alliance: http://www.orixo.com
(blogging at http://www.rabellino.it/blog/)

Mime
View raw message