cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <thorsten.scherler....@juntadeandalucia.es>
Subject Re: [2.2] Weird NPE when concurrency
Date Thu, 31 Jan 2008 15:22:20 GMT
On Thu, 2008-01-31 at 05:42 -0800, Ralph Goers wrote:
> Could you post the stack trace?

One thing I need to point out that the block is using A LOT
communication with other blocks.

Well the stack differ randomly but here is one:

2008-01-31 14:54:19.584::WARN:  Nested in
javax.servlet.ServletException: org.apache.cocoon.ProcessingException:
Failed to process pipeline
	at <map:serialize type="xhtml"> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:65:38
	at <map:transform> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:64:70
	at <map:transform> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:63:55
	at <map:transform type="dispatcher"> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:55:42
	at <map:generate type="jx"> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:49:67
	at <map:match> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:48:36
	at <map:mount> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/portal-1.0-SNAPSHOT/sitemap.xmap:109:78:
org.apache.cocoon.ProcessingException: Failed to process pipeline
	at <map:serialize type="xhtml"> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:65:38
	at <map:transform> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:64:70
	at <map:transform> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:63:55
	at <map:transform type="dispatcher"> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:55:42
	at <map:generate type="jx"> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:49:67
	at <map:match> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:48:36
	at <map:mount> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/portal-1.0-SNAPSHOT/sitemap.xmap:109:78
	at
org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:143)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:923)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:548)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:278)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:439)
	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.process(Unknown Source)
	at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147)
	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:147)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:88)
	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.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:115)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:147)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:88)
	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:354)
	at
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:172)
	at
org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:63)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.apache.cocoon.servletservice.ServletServiceContext
$PathDispatcher.forward(ServletServiceContext.java:569)
	at org.apache.cocoon.servletservice.ServletServiceContext
$PathDispatcher.forward(ServletServiceContext.java:545)
	at org.apache.cocoon.servletservice.spring.ServletFactoryBean
$ServiceInterceptor.invoke(ServletFactoryBean.java:230)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy5.service(Unknown Source)
	at
org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:102)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	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:131)
	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:285)
	at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
	at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:821)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
	at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:368)
	at org.mortbay.thread.BoundedThreadPool
$PoolThread.run(BoundedThreadPool.java:442)
Caused by: org.xml.sax.SAXException: dispatcherError: 500 - Internal
server error
The contract "null" has thrown thrown an exception while trying to
transform the final markup. 

dispatcherErrorStack:
 org.apache.forrest.dispatcher.DispatcherException: 500 - Internal
server error
component: ContractBean
message:
Could not transform the result data in contractBean.
You need to invoke first the transfomer and the rawData.
If you see "The contract "null" has thrown thrown an exception..." that
can mean you nested contracts, which is forbidden!
	at
org.apache.forrest.dispatcher.transformation.DispatcherTransformer.contractProcessingEnd(DispatcherTransformer.java:840)
	at
org.apache.forrest.dispatcher.transformation.DispatcherTransformer.endElement(DispatcherTransformer.java:481)
	at
org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:111)
	at
org.apache.cocoon.xml.RedundantNamespacesFilter.endElement(RedundantNamespacesFilter.java:73)
	at
org.apache.cocoon.template.xml.AttributeAwareXMLConsumerImpl.endElement(AttributeAwareXMLConsumerImpl.java:82)
	at
org.apache.cocoon.template.script.event.EndElement.execute(EndElement.java:46)
	at org.apache.cocoon.template.script.Invoker.execute(Invoker.java:74)
	at
org.apache.cocoon.template.JXTemplateGenerator.performGeneration(JXTemplateGenerator.java:151)
	at
org.apache.cocoon.template.JXTemplateGenerator.generate(JXTemplateGenerator.java:137)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:544)
	... 58 more
2008-01-31
14:54:19.589::WARN:  /temas/personas/consumo_publicaciones.html
org.apache.cocoon.ProcessingException: Failed to process pipeline
	at <map:serialize type="xhtml"> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:65:38
	at <map:transform> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:64:70
	at <map:transform> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:63:55
	at <map:transform type="dispatcher"> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:55:42
	at <map:generate type="jx"> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:49:67
	at <map:match> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/work/blocks/dispatcher/sitemap.xmap:48:36
	at <map:mount> -
file:///home/thorsten/src/sadesi/portalv4/portal/target/portal-1.0-SNAPSHOT/sitemap.xmap:109:78
	at
org.apache.cocoon.ProcessingException.throwLocated(ProcessingException.java:143)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:923)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:548)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:278)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:439)
	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.process(Unknown Source)
	at
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147)
	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:147)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:88)
	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.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:115)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:147)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:77)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:88)
	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:354)
	at
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java:172)
	at
org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:63)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	at org.apache.cocoon.servletservice.ServletServiceContext
$PathDispatcher.forward(ServletServiceContext.java:569)
	at org.apache.cocoon.servletservice.ServletServiceContext
$PathDispatcher.forward(ServletServiceContext.java:545)
	at org.apache.cocoon.servletservice.spring.ServletFactoryBean
$ServiceInterceptor.invoke(ServletFactoryBean.java:230)
	at
org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:166)
	at
org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
	at $Proxy5.service(Unknown Source)
	at
org.apache.cocoon.servletservice.DispatcherServlet.service(DispatcherServlet.java:102)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
	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:131)
	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:285)
	at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:502)
	at org.mortbay.jetty.HttpConnection
$RequestHandler.headerComplete(HttpConnection.java:821)
	at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:513)
	at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:208)
	at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:378)
	at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:368)
	at org.mortbay.thread.BoundedThreadPool
$PoolThread.run(BoundedThreadPool.java:442)
Caused by: org.xml.sax.SAXException: dispatcherError: 500 - Internal
server error
The contract "null" has thrown thrown an exception while trying to
transform the final markup. 

dispatcherErrorStack:
 org.apache.forrest.dispatcher.DispatcherException: 500 - Internal
server error
component: ContractBean
message:
Could not transform the result data in contractBean.
You need to invoke first the transfomer and the rawData.
If you see "The contract "null" has thrown thrown an exception..." that
can mean you nested contracts, which is forbidden!
	at
org.apache.forrest.dispatcher.transformation.DispatcherTransformer.contractProcessingEnd(DispatcherTransformer.java:840)
	at
org.apache.forrest.dispatcher.transformation.DispatcherTransformer.endElement(DispatcherTransformer.java:481)
	at
org.apache.cocoon.xml.AbstractXMLPipe.endElement(AbstractXMLPipe.java:111)
	at
org.apache.cocoon.xml.RedundantNamespacesFilter.endElement(RedundantNamespacesFilter.java:73)
	at
org.apache.cocoon.template.xml.AttributeAwareXMLConsumerImpl.endElement(AttributeAwareXMLConsumerImpl.java:82)
	at
org.apache.cocoon.template.script.event.EndElement.execute(EndElement.java:46)
	at org.apache.cocoon.template.script.Invoker.execute(Invoker.java:74)
	at
org.apache.cocoon.template.JXTemplateGenerator.performGeneration(JXTemplateGenerator.java:151)
	at
org.apache.cocoon.template.JXTemplateGenerator.generate(JXTemplateGenerator.java:137)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:544)
	... 58 more

> 
> Thorsten Scherler wrote:
> > Hi all,
> >
> > we have build a webapp based on cocoon 2.2. Everything is working fine
> > if a single person is using the app, but as soon as we have concurrent
> > user the code fails with NPE in different lines of the code.
> >
> > My questions are:
> > Every pipeline is thread safe, right?
> > The mounts to the different servlet (blocks) is synchronized, right?
> > Is there a connection timeout for inner block communications?
> >
> > The architecture is as follow:
> > main webapp - mounts dispatcher sitemap (from block)
> >
> > Main match:
> >  <map:match pattern="**.html">
> >         <map:generate src="lm://resolve.structurer.{1}" type="jx">
> >           <map:parameter name="lenient-xpath" value="true"/>
> >           <map:parameter name="getRequest" value="{1}"/>
> >           <map:parameter name="contextPath"
> > value="{request:contextPath}"/>
> >           <map:parameter name="getRequestExtension" value="html"/>
> >         </map:generate>
> >         <map:transform type="dispatcher">
> >           <map:parameter name="cacheKey" value="{0}"/>
> >           <map:parameter name="validityFile"
> >             value="lm://resolve.structurer.{1}"/>
> >           <map:parameter name="request" value="{1}"/>
> >           <map:parameter name="type" value="html"/>
> >           <map:parameter name="hooksTransformer"
> > value="lm://hooks-to-html.xsl"/>
> >         </map:transform>
> >         <map:transform src="lm://namespace-stripped"/>
> >         <map:transform src="lm://strip-dispatcher-remains-html.xsl"/>
> >         <map:serialize type="xhtml"/>
> >       </map:match>
> >
> > salu2
> >   
-- 
Thorsten Scherler                                 thorsten.at.apache.org
Open Source Java                      consulting, training and solutions


Mime
View raw message