cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexander Klimetschek (JIRA)" <j...@apache.org>
Subject [jira] Commented: (COCOON-1939) Stack overflow when inheriting from block that alread inherits from another one
Date Fri, 27 Oct 2006 12:53:17 GMT
    [ http://issues.apache.org/jira/browse/COCOON-1939?page=comments#action_12445172 ] 
            
Alexander Klimetschek commented on COCOON-1939:
-----------------------------------------------

The cocoon:/ protocol is not the problem. Now block:super: fails in one case. I have block
A <-- super <-- B. Now B calls super, then A calls block:/foo, this is handled by B
(which has a foo-matcher), which in turn wants to call block:super:/dforms-model-directory.xml,
which fails. So it goes up, down and the follwing up does not work.

The simplified and annotated stacktrace:

javax.servlet.ServletException: No dispatcher for block:super:/dforms-model-directory.xml
	at org.apache.cocoon.blocks.BlockConnection.getInputStream(BlockConnection.java:114)
	at org.apache.cocoon.blocks.components.BlockSource.getInputStream(BlockSource.java:51)
	at org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.java:462)
	at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:298)
	at org.apache.cocoon.sitemap.DefaultContentAggregator.generate(DefaultContentAggregator.java:123)
	(Block B)
	...
	at org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:123)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.cocoon.blocks.BlockContext$PathDispatcher.forward(BlockContext.java:436)
	at org.apache.cocoon.blocks.BlockConnection.getInputStream(BlockConnection.java:115)
	at org.apache.cocoon.blocks.components.BlockSource.getInputStream(BlockSource.java:51)
	at org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.java:462)
	at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:298)
	at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:116)
	(Block A)
	...
	at org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:123)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.cocoon.blocks.BlockContext$PathDispatcher.forward(BlockContext.java:436)
	at org.apache.cocoon.blocks.BlockContext$NamedDispatcher.forward(BlockContext.java:394)
	at org.apache.cocoon.blocks.BlockConnection.getInputStream(BlockConnection.java:115)
	at org.apache.cocoon.blocks.components.BlockSource.getInputStream(BlockSource.java:51)
	at org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.java:462)
	at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:298)
	at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:116)
	(Block B)
	...
	at org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:123)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.cocoon.blocks.BlockContext$PathDispatcher.forward(BlockContext.java:436)
	at org.apache.cocoon.blocks.BlockServlet.service(BlockServlet.java:125)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.cocoon.blocks.DispatcherServlet.service(DispatcherServlet.java:124)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.cocoon.bootstrap.servlet.ShieldingServlet.service(ShieldingServlet.java:106)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:443)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1050)
	at org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:104)
	at org.apache.cocoon.bootstrap.servlet.ShieldingServletFilter.doFilter(ShieldingServletFilter.java:50)
	...

The full stacktrace:

javax.servlet.ServletException: No dispatcher for block:super:/dforms-model-directory.xml
	at org.apache.cocoon.blocks.BlockConnection.getInputStream(BlockConnection.java:114)
	at org.apache.cocoon.blocks.components.BlockSource.getInputStream(BlockSource.java:51)
	at org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.java:462)
	at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:298)
	at org.apache.cocoon.sitemap.DefaultContentAggregator.generate(DefaultContentAggregator.java:123)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
	at $Proxy11.generate(Unknown Source)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:537)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:437)
	at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
	at $Proxy2.process(Unknown Source)
	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:134)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:152)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:239)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:170)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:228)
	at org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:123)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.cocoon.blocks.BlockContext$PathDispatcher.forward(BlockContext.java:436)
	at org.apache.cocoon.blocks.BlockConnection.getInputStream(BlockConnection.java:115)
	at org.apache.cocoon.blocks.components.BlockSource.getInputStream(BlockSource.java:51)
	at org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.java:462)
	at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:298)
	at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:116)
	at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
	at $Proxy3.generate(Unknown Source)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:537)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:722)
	at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
	at $Proxy2.process(Unknown Source)
	at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:344)
	at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:97)
	at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:293)
	at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:116)
	at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
	at $Proxy3.generate(Unknown Source)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:537)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:722)
	at sun.reflect.GeneratedMethodAccessor71.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
	at $Proxy2.process(Unknown Source)
	at org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:344)
	at org.apache.cocoon.components.source.SourceUtil.toSAX(SourceUtil.java:97)
	at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:293)
	at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:116)
	at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
	at $Proxy3.generate(Unknown Source)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:537)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:437)
	at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
	at $Proxy2.process(Unknown Source)
	at org.apache.cocoon.components.source.impl.SitemapSource.getInputStream(SitemapSource.java:198)
	at org.apache.cocoon.reading.ResourceReader.generate(ResourceReader.java:329)
	at sun.reflect.GeneratedMethodAccessor42.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
	at $Proxy8.generate(Unknown Source)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processReader(AbstractProcessingPipeline.java:649)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:429)
	at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
	at $Proxy2.process(Unknown Source)
	at org.apache.cocoon.components.treeprocessor.sitemap.ReadNode.invoke(ReadNode.java:95)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:152)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:239)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:170)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:228)
	at org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:123)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.cocoon.blocks.BlockContext$PathDispatcher.forward(BlockContext.java:436)
	at org.apache.cocoon.blocks.BlockContext$NamedDispatcher.forward(BlockContext.java:394)
	at org.apache.cocoon.blocks.BlockConnection.getInputStream(BlockConnection.java:115)
	at org.apache.cocoon.blocks.components.BlockSource.getInputStream(BlockSource.java:51)
	at org.apache.cocoon.components.source.SourceUtil.getInputSource(SourceUtil.java:462)
	at org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:298)
	at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:116)
	at sun.reflect.GeneratedMethodAccessor40.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
	at $Proxy3.generate(Unknown Source)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:537)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:437)
	at sun.reflect.GeneratedMethodAccessor18.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$ProxyHandler.invoke(PoolableFactoryBean.java:349)
	at $Proxy2.process(Unknown Source)
	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:134)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.SwitchSelectNode.invoke(SwitchSelectNode.java:88)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.ContainerNode.invoke(ContainerNode.java:37)
	at org.apache.cocoon.components.treeprocessor.CategoryNode.invokeByName(CategoryNode.java:65)
	at org.apache.cocoon.components.treeprocessor.sitemap.CallNode.invoke(CallNode.java:83)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:55)
	at org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(MatchNode.java:87)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:152)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:93)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:239)
	at org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:170)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:228)
	at org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:123)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.cocoon.blocks.BlockContext$PathDispatcher.forward(BlockContext.java:436)
	at org.apache.cocoon.blocks.BlockServlet.service(BlockServlet.java:125)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.cocoon.blocks.DispatcherServlet.service(DispatcherServlet.java:124)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
	at org.apache.cocoon.bootstrap.servlet.ShieldingServlet.service(ShieldingServlet.java:106)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:443)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1050)
	at org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:104)
	at org.apache.cocoon.bootstrap.servlet.ShieldingServletFilter.doFilter(ShieldingServletFilter.java:50)
	at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1041)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:354)
	at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:226)
	at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:615)
	at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
	at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
	at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
	at org.mortbay.jetty.Server.handle(Server.java:269)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
	at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:678)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:492)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:199)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
	at org.mortbay.jetty.nio.HttpChannelEndPoint.run(HttpChannelEndPoint.java:270)
	at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)

> Stack overflow when inheriting from block that alread inherits from another one
> -------------------------------------------------------------------------------
>
>                 Key: COCOON-1939
>                 URL: http://issues.apache.org/jira/browse/COCOON-1939
>             Project: Cocoon
>          Issue Type: Bug
>          Components: - Blocks Framework
>    Affects Versions: 2.2-dev (Current SVN)
>            Reporter: Alexander Klimetschek
>
> There are problems with the following scenario: I have one Block A, another one B that
has A as super-block defined and a third one C that has B as super-block defined.
> The super-relation between B and A works ok, but if you start in C, then forward to B,
which in turn wants to forward to block A (all via the block:super: protocol), a stack overflow
happens. It looks like he always thinks he is in C, so that block:super: from B will always
get to B, thus creating an endless loop.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message