cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nikolas List <l...@metromorph.de>
Subject Re: [C2.2, SSF] super connection doesn't work??
Date Fri, 21 Nov 2008 07:17:08 GMT
Hi Grzegorz,

Grzegorz Kossakowski schrieb:
> Nikolas List pisze:
>> Hi all,
>>
>> I have problems to configure two cocoon blocks, where one is a
>> descendant of the other (via the special "super" connection) as
>> described in [1]. Following the description there I would expect that
>> accessing an URL block1/testURL, for which no matcher in the block1s
>> sitemap exists, should be passed to the servlet mounted under block2.
>> This doesn't seem to be the case.
>>
>> To be more concrete the setup is the following: I created two simple
>> blocks as described in [2].
>>
>> In block1/src/main/resources/COB-INF/sitemap.xmap I deleted the matcher
>> "spring-bean" serving the bean example.
>>
>> I added a dependency to block2 in block1/pom.xml and linked block2 as
>> super-block in
>> block1/src/main/resources/META-INF/cocoon/spring/block-servlet-service.xml
>> as follows:
>>
>>  <bean name="test.block1.service"
>> class="org.apache.cocoon.sitemap.SitemapServlet">
>>     <servlet:context mount-path="/block1"
>> context-path="blockcontext:/block1/">
>>       <servlet:connections>
>>         <entry key="super" value-ref="test.block2.service"/>
>>       </servlet:connections>
>>     </servlet:context>
>>   </bean>
>>
>> Accessing the URL localhost:8888/block1/spring-bean I would expect the
>> output generated by block2 as follows:
>>
>> <demo>
>>   <module>org.test:block2-old</module>
>>   <spring>#message</spring>
>> </demo>
>>
>> The truth is: I get a 404 http error.
>>
>> Do I missunderstand the concept of inheritance in the
>> servlet-service-framework or is there any misconfiguration in my simple
>> example?
>>
>> The most astonishing thing is, that it worked out of the box using the
>> archetypes from RC2 (1.0.0-RC2 (cocoon-core: 2.2.0-RC2,
>> cocoon-servlet-service-components: 1.0.0-RC1)).
>>
>> Any help is appreciated.
> 
> Hi Nikolas,
> 
> Your example looks correct and your understanding of the whole concept looks correct.
Actually, it's
> hard to say what wrong is going on here. Have you checked cocoon logs? I believe SSF
logs quite a
> lot of information about its "super" attempts.
> 
You expect  sth like

INFO  servletservice.ServletServiceContext - Enter processing in servlet
service super

and

INFO  servletservice.ServletServiceContext - Leaving processing in
servlet service super

??

I didn't find any such output of SSF in the logs.

Probably the relevant part in the logs are:

2008-11-21 08:11:25,553 btpool0-1 DEBUG servletservice.DispatcherServlet
- DispatcherServlet: service
servlet=org.apache.cocoon.sitemap.SitemapServlet@1e68ce4
mountPath=/block1 servletPath=/block1 pathInfo=/spring-bean
2008-11-21 08:11:25,553 btpool0-1 DEBUG internal.EnvironmentHelper -
Changing Cocoon context
2008-11-21 08:11:25,553 btpool0-1 DEBUG internal.EnvironmentHelper -
from
context(file:///home/niko/tmp/cocoontest/block1/./src/main/resources/COB-INF/)
and prefix(null)
2008-11-21 08:11:25,553 btpool0-1 DEBUG internal.EnvironmentHelper -
to
context(file:///home/niko/tmp/cocoontest/block1/./src/main/resources/COB-INF/sitemap.xmap)
and prefix()
2008-11-21 08:11:25,553 btpool0-1 DEBUG source.CocoonSourceResolver -
Resolving
'file:///home/niko/tmp/cocoontest/block1/./src/main/resources/COB-INF/'
with base
'file:///home/niko/tmp/cocoontest/block1/./src/main/resources/COB-INF/'
in context 'file:/home/niko/tmp/cocoontest/block1/'
2008-11-21 08:11:25,553 btpool0-1 DEBUG
support.DefaultListableBeanFactory - Returning cached instance of
singleton bean 'org.apache.avalon.framework.service.ServiceManager'
2008-11-21 08:11:25,554 btpool0-1 DEBUG
support.DefaultListableBeanFactory - Returning cached instance of
singleton bean 'org.apache.excalibur.source.SourceFactory/file'
2008-11-21 08:11:25,554 btpool0-1 DEBUG source.CocoonSourceResolver -
Resolved to systemID :
file:///home/niko/tmp/cocoontest/block1/./src/main/resources/COB-INF/
2008-11-21 08:11:25,554 btpool0-1 DEBUG
support.DefaultListableBeanFactory - Returning cached instance of
singleton bean 'org.apache.avalon.framework.service.ServiceManager'
2008-11-21 08:11:25,554 btpool0-1 DEBUG
support.DefaultListableBeanFactory - Returning cached instance of
singleton bean 'org.apache.excalibur.source.SourceFactory/file'
2008-11-21 08:11:25,554 btpool0-1 DEBUG internal.EnvironmentHelper - New
context is
file:///home/niko/tmp/cocoontest/block1/./src/main/resources/COB-INF/
2008-11-21 08:11:25,554 btpool0-1 DEBUG
support.DefaultListableBeanFactory - Returning cached instance of
singleton bean 'org.apache.cocoon.el.objectmodel.ObjectModel'
2008-11-21 08:11:25,554 btpool0-1 DEBUG http.HttpEnvironment - Response
successfully reset
2008-11-21 08:11:25,554 btpool0-1 WARN  cocoon.access - No pipeline
matched request: spring-bean
org.apache.cocoon.ResourceNotFoundException: No pipeline matched
request: spring-bean
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:149)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
.....

> Also, full stack-trace for 404 http error would be helpful.
> 

The full stacktrace is as follows:

javax.servlet.ServletException:
org.apache.cocoon.ResourceNotFoundException: No pipeline matched
request: spring-bean
	at
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:197)
	at org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:84)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:468)
	at
org.apache.cocoon.servletservice.ServletServiceContext$PathDispatcher.forward(ServletServiceContext.java:443)
	at
org.apache.cocoon.servletservice.spring.ServletFactoryBean$ServiceInterceptor.invoke(ServletFactoryBean.java:264)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy3.service(Unknown Source)
	at
org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:106)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServlet.service(ReloadingServlet.java:91)
	at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
	at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1093)
	at
org.apache.cocoon.servlet.multipart.MultipartFilter.doFilter(MultipartFilter.java:131)
	at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:51)
	at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
	at org.apache.cocoon.servlet.DebugFilter.doFilter(DebugFilter.java:167)
	at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:51)
	at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
	at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingSpringFilter.doFilter(ReloadingSpringFilter.java:67)
	at
org.apache.cocoon.tools.rcl.wrapper.servlet.ReloadingServletFilter.doFilter(ReloadingServletFilter.java:51)
	at
org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1084)
	at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
	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:726)
	at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
	at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:206)
	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:324)
	at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
	at
org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:828)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:514)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
	at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
	at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:450)
Caused by: org.apache.cocoon.ResourceNotFoundException: No pipeline
matched request: spring-bean
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:149)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:78)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:81)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:239)
	at
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process(ConcreteTreeProcessor.java:171)
	at
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:247)
	at
org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java:351)
	at
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:169)
	... 38 more


Thanks for your help.

Regards
Niko

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


Mime
View raw message