cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lionel Crine <cr...@4dconcept.fr>
Subject Re: ArrayIndexOutOfBoundsException when using copy-of to write into a new node
Date Fri, 20 Jun 2003 14:03:42 GMT
hi,
there is an error :
use
   <xsl:copy-of select="document(concat('../xmldocs/', string($document)))/*"/>
instead of
   <xsl:copy-of select="document(concat('../xmldocs/', tring($document)))/*"/>

Also, $document is an <xsl:param> ?

About the error I don't know.
try to send this to the mulberrytech <xsl-list@lists.mulberrytech.com>.


Lionel


At 17:12 19/06/2003 +0200, you wrote:
>hi!
>
>I'm creating a website using the following software:
>Tomcat:4.1.24
>Cocoon: version 2.0.5-dev
>Xalan: 2.5.1
>Xerces: 2.4.0
>
>
>What I'd like to do is the following:
>Create a new tag in the result tree and copy a part of another xml-file in 
>there.
>Just like this:
>
>   <xsl:template match="content_element">
>      <abcdef>
>         <xsl:copy-of select="document(concat('../xmldocs/', 
> tring($document)))/*"/>
>      </abcdef>
>   </xsl:template>
>
>This gives the following error which seems strange to me.
>
>--------------------------------ERROR MESSAGE-------------------------
>
>The org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode 
>notifies that org.apache.cocoon.ProcessingException says:
>
>Exception during processing of 
>file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/commondocs/structure.xml
>
>More precisely:
>
>org.apache.cocoon.ProcessingException: Exception during processing of 
>file:/C:/Progra~1/jakarta-omcat-4.1.24/webapps/cocoon/docs/educeth/commondocs/structure.xml:

>java.lang.RuntimeException: Errors in XSLT transformation:
>Fatal: File 
>file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/stylesheets/assembly.xsl;

>Line 59; Column 81; java.lang.ArrayIndexOutOfBoundsException: -1
>
>-----------------------------END OF ERROR MESSAGE---------------------
>
>
>I get the same error if I use
>
>   <xsl:template match="content_element">
>      <xsl:element name="abcdef">
>          <xsl:copy-of select="document(concat('../xmldocs/', 
> string($document)))/*"/>
>      <xsl:element/>
>   </xsl:template>
>
>
>
>Every other tag than <xsl:copy of.../> works as it should.
>
>
>Below, I have attached the complete exception trace.
>
>
>I would be very glad if someone could help me!
>Thanks in advance!
>Stefan
>
>
>Original exception : java.lang.RuntimeException: Errors in XSLT 
>transformation:
>Fatal: File 
>file:/C:/Progra~1/jakarta-tomcat-4.1.24/webapps/cocoon/docs/educeth/stylesheets/assembly.xsl;

>Line 59; Column 81; java.lang.ArrayIndexOutOfBoundsException: -1
>
>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:589)
>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.dispatch(Unknown

>Source)
>at 
>org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown 
>Source)
>at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
>at org.apache.xerces.parsers.DTDConfiguration.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:302)
>at org.apache.excalibur.xml.impl.JaxpParser.parse(JaxpParser.java:321)
>at 
>org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:197)
>at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:143)
>at 
>org.apache.cocoon.components.pipeline.CachingEventPipeline.process(CachingEventPipeline.java:258)
>at 
>org.apache.cocoon.components.pipeline.CachingStreamPipeline.process(CachingStreamPipeline.java:412)
>at 
>org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:148)
>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:151)
>at 
>org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:108)
>at 
>org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:145)
>at 
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:340)
>at 
>org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:301)
>at org.apache.cocoon.Cocoon.process(Cocoon.java:581)
>at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1048)
>at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>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)
>
>_________________________________________________________________
>MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. 
>http://join.msn.com/?page=features/virus
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
>For additional commands, e-mail: cocoon-users-help@xml.apache.org


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


Mime
View raw message