cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean-Christophe Kermagoret <...@openbluelab.org>
Subject blockcontent bug ?
Date Thu, 12 Jul 2007 10:02:38 GMT
No answer from users@c.a.o, try dev@c.a.o

Hi,
I'm using C22 from trunk svn :

I have created blocks through archetypes :
* cms
* common
* locator

1) Block definitions

They all define public blocks through
META-INF/cocoon/spring/servlet-service.xml

In cms/META-INF/cocoon/spring/servlet-service.xml, I have :
      <bean id="org.openbluelab.cms.block"
class="org.apache.cocoon.sitemap.SitemapServlet">
        <servlet:context mount-path="/content"
context-path="blockcontext:/cms/"/>
      </bean>

In common..., I have :
      <bean id="org.openbluelab.common.block"
class="org.apache.cocoon.sitemap.SitemapServlet">
        <servlet:context mount-path="/common"
context-path="blockcontext:/common/"/>
      </bean>

In locator, I have :
      <bean id="org.openbluelab.locator.block"
class="org.apache.cocoon.sitemap.SitemapServlet">
        <servlet:context mount-path="/locator"
context-path="blockcontext:/locator/"/>
      </bean>

2) Sitemaps

In cms/COB-INF/sitemap.xmap, I have the following snippet :
...
            <map:match pattern="config/conf.xml">
                <map:generate src="docs/config/conf.xml"/>
                <map:serialize type="xml"/>
            </map:match>
...

==> /content/config/conf.xml returns expected xml

In common/COB-INF/sitemap.xmap , I have the following snippet :
...
            <map:match pattern="test">
                <map:generate src="blockcontext:/content/config/conf.xml"/>
                <map:serialize type="xml"/>
            </map:match>
...

==> /common/test DOESN'T return expected xml ==> ERROR

If I replace blockcontext:/content/... with blockcontext:/cms/, then it
works, but it should be the first because of mount path for cms block...

In locator/COB-INF/sitemap.xmap, I have the following snippet :
...
            <map:match pattern="test">
                <map:generate src="blockcontext:/common/test"/>
                <map:serialize type="xml"/>
            </map:match>
...

==> /locator/test DOESN'T WORK, whatever I put in common block's
sitemap, but it should be, shouldn't be it (is that correct english :-)

Last line from error message clearly indicates a problem while resolving
source.

Any ideas ?

The error message I get is the following :
[INFO] CacheImpl - Cache MISS for
PK_G-file-file:/opt/src/cocoon-22/trunk/test2/common/target/classes/COB-INF/test_S-xml-;encoding=ISO-8859-1
[WARN] cocoon - Resource not found.
    at <map:serialize type="xml"> -
file:/opt/src/cocoon-22/trunk/test2/locator/target/classes/COB-INF/sitemap.xmap:52:41
    at <map:generate> -
file:/opt/src/cocoon-22/trunk/test2/locator/target/classes/COB-INF/sitemap.xmap:51:61
    at <map:match> -
file:/opt/src/cocoon-22/trunk/test2/locator/target/classes/COB-INF/sitemap.xmap:50:39
javax.servlet.ServletException:
org.apache.cocoon.ResourceNotFoundException: Resource not found.
    at <map:serialize type="xml"> -
file:/opt/src/cocoon-22/trunk/test2/locator/target/classes/COB-INF/sitemap.xmap:52:41
    at <map:generate> -
file:/opt/src/cocoon-22/trunk/test2/locator/target/classes/COB-INF/sitemap.xmap:51:61
    at <map:match> -
file:/opt/src/cocoon-22/trunk/test2/locator/target/classes/COB-INF/sitemap.xmap:50:39
    at
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:199)
    at
org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:62)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:538)
    at
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:520)
    at
org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:229)
    at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
    at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
    at $Proxy0.service(Unknown Source)
    at
org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:96)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServlet.service(ReloadingServlet.java:89)
    at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1098)
    at
org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:119)
    at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:50)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
    at org.apache.cocoon.servlet.DebugFilter.doFilter(DebugFilter.java:169)
    at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:50)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
    at
org.springframework.web.filter.RequestContextFilter.doFilterInternal(RequestContextFilter.java:63)
    at
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
    at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:50)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
    at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingSpringFilter.doFilter(ReloadingSpringFilter.java:71)
    at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:50)
    at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1089)
    at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:365)
    at
org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at
org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
    at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
    at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:211)
    at
org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
    at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
    at org.mortbay.jetty.Server.handle(Server.java:286)
    at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:503)
    at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:827)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:511)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:210)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:379)
    at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:361)
    at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:442)
Caused by: org.apache.cocoon.ResourceNotFoundException: Resource not found.
    at <map:serialize type="xml"> -
file:/opt/src/cocoon-22/trunk/test2/locator/target/classes/COB-INF/sitemap.xmap:52:41
    at <map:generate> -
file:/opt/src/cocoon-22/trunk/test2/locator/target/classes/COB-INF/sitemap.xmap:51:61
    at <map:match> -
file:/opt/src/cocoon-22/trunk/test2/locator/target/classes/COB-INF/sitemap.xmap:50:39
    at
org.apache.cocoon.components.source.util.SourceUtil.handle(SourceUtil.java:330)
    at
org.apache.cocoon.components.source.util.SourceUtil.getInputSource(SourceUtil.java:400)
    at
org.apache.cocoon.components.source.util.SourceUtil.parse(SourceUtil.java:238)
    at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:109)
    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.PoolableProxyHandler.invoke(PoolableProxyHandler.java:72)
    at $Proxy8.generate(Unknown Source)
    at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:542)
    at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:275)
    at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:437)
    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.PoolableProxyHandler.invoke(PoolableProxyHandler.java:72)
    at $Proxy7.process(Unknown Source)
    at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:143)
    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:151)
    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:240)
    at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:171)
    at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:251)
    at
org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java:357)
    at
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:171)
    ... 42 more
Caused by: org.apache.excalibur.source.SourceNotFoundException:
file:/opt/src/cocoon-22/trunk/test2/common/target/classes/COB-INF/test
doesn't exist.
    at
org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:150)
    at
org.apache.cocoon.components.source.util.SourceUtil.getInputSource(SourceUtil.java:395)
    ... 71 more
Caused by: java.io.FileNotFoundException:
/opt/src/cocoon-22/trunk/test2/common/target/classes/COB-INF/test (No
such file or directory)
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(FileInputStream.java:106)
    at
org.apache.excalibur.source.impl.FileSource.getInputStream(FileSource.java:146)

-- 
Jean-Christophe Kermagoret,
OpenBlueLab Technological Leader

http://www.openbluelab.org
http://forge.openbluelab.org
http://wiki.openbluelab.org
http://demo.openbluelab.org




Mime
View raw message