cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bart Molenkamp" <b.molenk...@bizzdesign.nl>
Subject [2.2] NPE when using block: protocol, caused by a ResourceNotFoundException
Date Thu, 21 Dec 2006 16:11:56 GMT
Hi,

While using the block: protocol, I got NullPointerExceptions because a
resource could not be found in the target block. This was due to a
ResourceNotFoundException, and when Cocoon tries to report the
exception, the NPE occurs.

It seems that the outputStream member is null. Has anybody any idea
where this should be set? The exception is quite confusing, because I
can't see the original ResourceNotFoundException.

Here is the stacktrace:

java.lang.NullPointerException
	at
org.apache.cocoon.blocks.util.BlockCallHttpServletResponse$1.write(Block
CallHttpServletResponse.java:158)
	at java.io.OutputStream.write(OutputStream.java:99)
	at java.io.OutputStream.write(OutputStream.java:58)
	at
org.apache.cocoon.components.notification.Notifier.notifyHTML(Notifier.j
ava:104)
	at
org.apache.cocoon.components.notification.Notifier.notify(Notifier.java:
49)
	at
org.apache.cocoon.servlet.RequestProcessor.manageException(RequestProces
sor.java:306)
	at
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java
:176)
	at
org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:61)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at
org.apache.cocoon.blocks.BlockContext$PathDispatcher.forward(BlockContex
t.java:461)
	at
org.apache.cocoon.blocks.BlockContext$NamedDispatcher.forward(BlockConte
xt.java:404)
	at
org.apache.cocoon.blocks.BlockConnection.getInputStream(BlockConnection.
java:115)
	at
org.apache.cocoon.blocks.components.BlockSource.getInputStream(BlockSour
ce.java:51)
	at
org.apache.cocoon.reading.ResourceReader.generate(ResourceReader.java:32
7)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$Proxy
Handler.invoke(PoolableFactoryBean.java:349)
	at $Proxy4.generate(Unknown Source)
	at
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipe
line.processReader(AbstractCachingProcessingPipeline.java:878)
	at
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process
(AbstractProcessingPipeline.java:429)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
a:39)
	at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
Impl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:585)
	at
org.apache.cocoon.core.container.spring.avalon.PoolableFactoryBean$Proxy
Handler.invoke(PoolableFactoryBean.java:349)
	at $Proxy3.process(Unknown Source)
	at
org.apache.cocoon.components.treeprocessor.sitemap.ReadNode.invoke(ReadN
ode.java:94)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:55)
	at
org.apache.cocoon.components.treeprocessor.sitemap.MatchNode.invoke(Matc
hNode.java:87)
	at
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.
invokeNodes(AbstractParentProcessingNode.java:77)
	at
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P
ipelineNode.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(TreePro
cessor.java:233)
	at
org.apache.cocoon.servlet.RequestProcessor.process(RequestProcessor.java
:377)
	at
org.apache.cocoon.servlet.RequestProcessor.service(RequestProcessor.java
:155)
	at
org.apache.cocoon.sitemap.SitemapServlet.service(SitemapServlet.java:61)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at
org.apache.cocoon.blocks.BlockContext$PathDispatcher.forward(BlockContex
t.java:461)
	at
org.apache.cocoon.blocks.BlockContext$PathDispatcher.forward(BlockContex
t.java:443)
	at
org.apache.cocoon.blocks.BlockServlet.service(BlockServlet.java:123)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at
org.apache.cocoon.blocks.DispatcherServlet.service(DispatcherServlet.jav
a:128)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
	at
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:428)
	at
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH
andler.java:473)
	at
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:568)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1530)
	at
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCon
text.java:633)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1482)
	at org.mortbay.http.HttpServer.service(HttpServer.java:909)
	at
org.mortbay.http.HttpConnection.service(HttpConnection.java:820)
	at
org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:986)
	at
org.mortbay.http.HttpConnection.handle(HttpConnection.java:837)
	at
org.mortbay.http.SocketListener.handleConnection(SocketListener.java:245
)
	at
org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:357)
	at
org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:534)

Thanks,
Bart.


Mime
View raw message