cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jacob Miles <j...@jakemiles.com>
Subject bug in xsl:when
Date Sun, 27 Feb 2005 20:44:52 GMT
Hi.  I got a NullPointerException when I accidentally used 'match'  
instead of 'test' in an xsl:when.  Thought I'd pass it along.

The xslt:

<xsl:template match="*">
		<xsl:choose>					
			<xsl:when test="html">
				<xsl:call-template name="html"/>
			</xsl:when>
			<xsl:when match="head">
				<xsl:call-template name="head"/>
			</xsl:when>
			<xsl:when test="body">
				<xsl:call-template name="body"/>
			</xsl:when>
			<xsl:otherwise>
				<xsl:copy-of select="."/>
			</xsl:otherwise>
		</xsl:choose>
	</xsl:template>

org.apache.cocoon.ProcessingException: Error executing pipeline.:  
java.lang.RuntimeException: java.lang.RuntimeException:  
java.lang.NullPointerException
	at  
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleE 
xception(AbstractProcessingPipeline.java:825)
	at  
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipe 
line.processXMLPipeline(AbstractCachingProcessingPipeline.java:270)
	at  
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process 
(AbstractProcessingPipeline.java:468)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke( 
SerializeNode.java:120)
	at  
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. 
invokeNodes(AbstractParentProcessingNode.java:46)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i 
nvoke(PreparableMatchNode.java:130)
	at  
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. 
invokeNodes(AbstractParentProcessingNode.java:68)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P 
ipelineNode.java:138)
	at  
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. 
invokeNodes(AbstractParentProcessingNode.java:68)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke( 
PipelinesNode.java:89)
	at  
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process 
(ConcreteTreeProcessor.java:240)
	at  
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process 
(ConcreteTreeProcessor.java:180)
	at  
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro 
cessor.java:243)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(Moun 
tNode.java:117)
	at  
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. 
invokeNodes(AbstractParentProcessingNode.java:46)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i 
nvoke(PreparableMatchNode.java:130)
	at  
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. 
invokeNodes(AbstractParentProcessingNode.java:68)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P 
ipelineNode.java:138)
	at  
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. 
invokeNodes(AbstractParentProcessingNode.java:68)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke( 
PipelinesNode.java:89)
	at  
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process 
(ConcreteTreeProcessor.java:240)
	at  
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process 
(ConcreteTreeProcessor.java:180)
	at  
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro 
cessor.java:243)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:606)
	at  
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java: 
1119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at  
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:354)
	at  
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH 
andler.java:294)
	at  
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 
567)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1808)
	at  
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCon 
text.java:525)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1758)
	at org.mortbay.http.HttpServer.service(HttpServer.java:879)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
	at  
org.mortbay.http.SocketListener.handleConnection(SocketListener.java: 
197)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:501)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException:  
java.lang.NullPointerException
	at  
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java: 
3418)
	at  
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(Transfor 
merHandlerImpl.java:389)
	at  
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java: 
55)
	at  
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransfo 
rmer.java:562)
	at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown  
Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown  
Source)
	at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
	at  
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dis 
patch(Unknown Source)
	at  
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno 
wn Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:296)
	at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315)
	at  
org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java: 
269)
	at  
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java: 
117)
	at  
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipe 
line.processXMLPipeline(AbstractCachingProcessingPipeline.java:258)
	... 37 more
java.lang.RuntimeException: java.lang.RuntimeException:  
java.lang.NullPointerException
	at  
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java: 
3418)
	at  
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(Transfor 
merHandlerImpl.java:389)
	at  
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java: 
55)
	at  
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransfo 
rmer.java:562)
	at org.apache.xerces.parsers.AbstractSAXParser.endDocument(Unknown  
Source)
	at org.apache.xerces.impl.XMLDocumentScannerImpl.endEntity(Unknown  
Source)
	at org.apache.xerces.impl.XMLEntityManager.endEntity(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
	at  
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dis 
patch(Unknown Source)
	at  
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno 
wn Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
	at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
	at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
	at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:296)
	at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:315)
	at  
org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java: 
269)
	at  
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java: 
117)
	at  
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipe 
line.processXMLPipeline(AbstractCachingProcessingPipeline.java:258)
	at  
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process 
(AbstractProcessingPipeline.java:468)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke( 
SerializeNode.java:120)
	at  
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. 
invokeNodes(AbstractParentProcessingNode.java:46)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i 
nvoke(PreparableMatchNode.java:130)
	at  
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. 
invokeNodes(AbstractParentProcessingNode.java:68)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P 
ipelineNode.java:138)
	at  
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. 
invokeNodes(AbstractParentProcessingNode.java:68)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke( 
PipelinesNode.java:89)
	at  
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process 
(ConcreteTreeProcessor.java:240)
	at  
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process 
(ConcreteTreeProcessor.java:180)
	at  
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro 
cessor.java:243)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(Moun 
tNode.java:117)
	at  
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. 
invokeNodes(AbstractParentProcessingNode.java:46)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.i 
nvoke(PreparableMatchNode.java:130)
	at  
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. 
invokeNodes(AbstractParentProcessingNode.java:68)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(P 
ipelineNode.java:138)
	at  
org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode. 
invokeNodes(AbstractParentProcessingNode.java:68)
	at  
org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke( 
PipelinesNode.java:89)
	at  
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process 
(ConcreteTreeProcessor.java:240)
	at  
org.apache.cocoon.components.treeprocessor.ConcreteTreeProcessor.process 
(ConcreteTreeProcessor.java:180)
	at  
org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreePro 
cessor.java:243)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:606)
	at  
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java: 
1119)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at  
org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:354)
	at  
org.mortbay.jetty.servlet.WebApplicationHandler.dispatch(WebApplicationH 
andler.java:294)
	at  
org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java: 
567)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1808)
	at  
org.mortbay.jetty.servlet.WebApplicationContext.handle(WebApplicationCon 
text.java:525)
	at org.mortbay.http.HttpContext.handle(HttpContext.java:1758)
	at org.mortbay.http.HttpServer.service(HttpServer.java:879)
	at org.mortbay.http.HttpConnection.service(HttpConnection.java:790)
	at org.mortbay.http.HttpConnection.handleNext(HttpConnection.java:952)
	at org.mortbay.http.HttpConnection.handle(HttpConnection.java:807)
	at  
org.mortbay.http.SocketListener.handleConnection(SocketListener.java: 
197)
	at org.mortbay.util.ThreadedServer.handle(ThreadedServer.java:289)
	at org.mortbay.util.ThreadPool$PoolThread.run(ThreadPool.java:501)


Mime
View raw message