cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Dulin <dul...@olegdulin.com>
Subject Re: XSP and XSLT -> Exception in ServerPagesGenerator.generate()
Date Wed, 15 Oct 2003 12:56:31 GMT
How do you transform the file ? Are you using a pipeline or something 
else outside of Cocoon ?

Cocoon XSLT transformer as is is using standard org.w3c.dom , not JDom. 
Perhaps you should add your own JDom transformer into the pipeline. 
Otherwise, I recommend converting the object into DOM first.

Oleg

Jaksch Stefan wrote:

> Hi, 
> 
> I'm using cocoon2.1.1 with tomcat 4.1.24 on win2000.
> I'm trying to use a java class (derived from org.jdom.Document) in a XSP (snippet below),
transform the result with XSLT and serialize it to html. 
> Calling just the XSP works, transforming a file (similar to the one generated by the
XSP) with my *.xsl also works - but when putting them together in a pipeline I get a 'Exception
in ServerPagesGenerator.generate()'...(stacktrace after the XSP-snippet)
> 
> Am I doing something wrong or could this be a bug in cocoon?
> 
> Thanks for your help, Stefan
> 
> 
> <xsp:page language="java"
>     xmlns:xsp="http://apache.org/xsp"
>     xmlns:xsp-request="http://apache.org/xsp/request/2.0">
> 		
> 	<xsp:structure>
> 		<xsp:include>...</xsp:include>
> 		<xsp:include>...</xsp:include>
> 	</xsp:structure>
> 
> 	<xsp:logic>
> 		String myFunc() {
> 		.
> 		.
> 		myClass.toSAX(contentHandler);
> 		.
> 		.
> 		}
> 	</xsp:logic>
> 
> 	<Result><xsp:expr>myFunc()</xsp:expr></Result>
>   
> </xsp:page>
> 
> Stacktrace:
> ----------------------------------------------------------------------------------------------
> org.apache.cocoon.ProcessingException: Exception in ServerPagesGenerator.generate():
java.lang.RuntimeException
> 
> 	at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:272)
> 
> 	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:548)
> 
> 	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:196)
> 
> 	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:492)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.ContainerNode.invoke(ContainerNode.java:66)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.TransformNode.invoke(TransformNode.java:119)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:164)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:161)
> 
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:363)
> 
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:316)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:164)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:161)
> 
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:363)
> 
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:316)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:164)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:161)
> 
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:363)
> 
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:316)
> 
> 	at org.apache.cocoon.Cocoon.process(Cocoon.java:637)
> 
> 	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1096)
> 
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
> 	at org.apache.cocoon.servlet.ParanoidCocoonServlet.service(ParanoidCocoonServlet.java:255)
> 
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> 
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> 
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
> 
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> 	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
> 
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> 
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 
> 	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
> 
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> 
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
> 
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> 
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> 
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> 	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> 
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
> 
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
> 
> 	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
> 
> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
> 
> 	at java.lang.Thread.run(Thread.java:536)
> 
> Caused by: java.lang.RuntimeException
> 
> 	at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3364)
> 
> 	at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:427)
> 
> 	at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
> 
> 	at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:529)
> 
> 	at org.apache.cocoon.www.iti_data.pictionary.xsp.edit_xsp.generate(org.apache.cocoon.www.iti_data.pictionary.xsp.edit_xsp:188)
> 
> 	at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:260)
> 
> 	... 66 more
> 
> java.lang.RuntimeException
> 
> 	at org.apache.xalan.transformer.TransformerImpl.run(TransformerImpl.java:3364)
> 
> 	at org.apache.xalan.transformer.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:427)
> 
> 	at org.apache.cocoon.xml.AbstractXMLPipe.endDocument(AbstractXMLPipe.java:91)
> 
> 	at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:529)
> 
> 	at org.apache.cocoon.www.iti_data.pictionary.xsp.edit_xsp.generate(org.apache.cocoon.www.iti_data.pictionary.xsp.edit_xsp:188)
> 
> 	at org.apache.cocoon.generation.ServerPagesGenerator.generate(ServerPagesGenerator.java:260)
> 
> 	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.processXMLPipeline(AbstractProcessingPipeline.java:548)
> 
> 	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:196)
> 
> 	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:492)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:147)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.ContainerNode.invoke(ContainerNode.java:66)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.TransformNode.invoke(TransformNode.java:119)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:164)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:161)
> 
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:363)
> 
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:316)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:164)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:161)
> 
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:363)
> 
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:316)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:133)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:84)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:164)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:164)
> 
> 	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
> 
> 	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:161)
> 
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:363)
> 
> 	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:316)
> 
> 	at org.apache.cocoon.Cocoon.process(Cocoon.java:637)
> 
> 	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1096)
> 
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> 
> 	at org.apache.cocoon.servlet.ParanoidCocoonServlet.service(ParanoidCocoonServlet.java:255)
> 
> 	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
> 
> 	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
> 
> 	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
> 
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> 	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
> 
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> 	at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
> 
> 	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
> 
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 
> 	at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
> 
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> 
> 	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172)
> 
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
> 
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> 	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
> 
> 	at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
> 
> 	at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
> 
> 	at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
> 
> 	at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
> 
> 	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:594)
> 
> 	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:392)
> 
> 	at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:565)
> 
> 	at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:619)
> 
> 	at java.lang.Thread.run(Thread.java:536)
> Stefan Jaksch, DI
> ------------------------------------------------
> Institut für Tragwerkslehre und Ingenieurholzbau
> TU-Wien, Karlplatz 13/254, A-1040 Wien
> Tel:    +43-1/58801-25423
> Fax:    +43-1/58801-25499
> E-mail: jaksch@iti.tuwien.ac.at
> ------------------------------------------------
>  
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
> 
> 



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


Mime
View raw message