cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ross Gardler <rgard...@apache.org>
Subject XPathDirectoryGenerator gives Runtime exception
Date Thu, 14 Jul 2005 13:19:30 GMT
I'm using the XPathDirectoryGenerator and I am having a little trouble 
with it giving a RuntimeException (partial stack trace at end of this 
mail). The strange thing is that if I use save the output of the 
XPathGenerator in a file it works.

My sitemap has:

<map:match pattern="resume.aggregate.xml">
  <map:generate type="xpathdirectory"
    src="{project:content.xdocs}/team/resume">
   <map:parameter name="include" value=".*.xml$"/>
   <map:parameter name="xpath" value="/"/>
  </map:generate>
  <map:serialize type="xml"/>
</map:match>

This gives the response I expect. Then I have:

<map:match pattern="resume.site.snippet.xml">
   <map:generate src="cocoon:/resume.aggregate.xml"/>
   <map:transform src="resources/stylesheets/resumeAggregate2site.xsl"/>
   <map:serialize type="xml"/>
</map:match>

If I request resume.site.snippet.xml I get an Internal Server Error 
(Cause is reported as null, error.log is below)

If I save the file returned from resume.aggregate.xml as test.xml and 
replace the generator in the second match with:

<map:generate src="test.xml"/>

Then I get the transformed document as I expect it.

I have also tested putting the generator in the second match with that 
from the first match, but as expected there is no change in behaviour 
(i.e. the error is still reported).

Does anyone have any ideas what is happening?

Here is a partial stacktrace from error.log:

ERROR   (2005-07-14) 13:17.49:639   [access] (/resume.site.snippet.xml) 
PoolThread-4/CocoonServlet: Internal Cocoon Problem
org.apache.cocoon.ProcessingException: Error executing pipeline.: 
java.lang.RuntimeException
	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:788)
	at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:263)
	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:664)
	at 
org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:349)
	at 
org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:206)
	at 
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:117)

.....

ERROR   (2005-07-14) 13:17.49:639   [access] (/resume.site.snippet.xml) 
PoolThread-4/CocoonServlet: Internal Cocoon Problem
org.apache.cocoon.ProcessingException: Error executing pipeline.: 
java.lang.RuntimeException
	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:788)
	at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:263)
	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:664)
	at 
org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:349)
	at 
org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:206)
	at 
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:117)
Caused by: java.lang.RuntimeException
	at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3418)
	at 
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:389)
	at 
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:55)
	at 
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:562)
	at 
org.apache.cocoon.environment.internal.EnvironmentChanger.endDocument(EnvironmentStack.java:118)
	at 
org.apache.cocoon.components.sax.XMLTeePipe.endDocument(XMLTeePipe.java:67)
	at 
org.apache.cocoon.xml.dom.DOMStreamer$NamespaceNormalizingDOMStreamer.stream(DOMStreamer.java:258)
	at org.apache.cocoon.xml.dom.DOMStreamer.stream(DOMStreamer.java:150)
	at 
org.apache.cocoon.generation.XPathDirectoryGenerator.performXPathQuery(XPathDirectoryGenerator.java:299)

....

ERROR   (2005-07-14) 13:17.49:639   [access] (/resume.site.snippet.xml) 
PoolThread-4/CocoonServlet: Internal Cocoon Problem
org.apache.cocoon.ProcessingException: Error executing pipeline.: 
java.lang.RuntimeException
	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.handleException(AbstractProcessingPipeline.java:788)
	at 
org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:263)
	at 
org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:664)
	at 
org.apache.cocoon.components.source.impl.SitemapSource.toSAX(SitemapSource.java:349)
	at 
org.apache.cocoon.components.source.SourceUtil.parse(SourceUtil.java:206)
	at 
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:117)
Caused by: java.lang.RuntimeException
	at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3418)
	at 
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:389)
	at 
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:55)
	at 
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:562)
	at 
org.apache.cocoon.environment.internal.EnvironmentChanger.endDocument(EnvironmentStack.java:118)
	at 
org.apache.cocoon.components.sax.XMLTeePipe.endDocument(XMLTeePipe.java:67)
	at 
org.apache.cocoon.xml.dom.DOMStreamer$NamespaceNormalizingDOMStreamer.stream(DOMStreamer.java:258)
	at org.apache.cocoon.xml.dom.DOMStreamer.stream(DOMStreamer.java:150)
	at 
org.apache.cocoon.generation.XPathDirectoryGenerator.performXPathQuery(XPathDirectoryGenerator.java:299)
java.lang.RuntimeException
	at 
org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3418)
	at 
org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:389)
	at 
org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:55)
	at 
org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:562)
	at 
org.apache.cocoon.environment.internal.EnvironmentChanger.endDocument(EnvironmentStack.java:118)
	at 
org.apache.cocoon.components.sax.XMLTeePipe.endDocument(XMLTeePipe.java:67)
	at 
org.apache.cocoon.xml.dom.DOMStreamer$NamespaceNormalizingDOMStreamer.stream(DOMStreamer.java:258)
	at org.apache.cocoon.xml.dom.DOMStreamer.stream(DOMStreamer.java:150)
	at 
org.apache.cocoon.generation.XPathDirectoryGenerator.performXPathQuery(XPathDirectoryGenerator.java:299)



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


Mime
View raw message