You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by David Verdin <ve...@agrocampus-rennes.fr> on 2004/09/30 18:38:01 UTC

Xalan behaviour in cocoon

Hi,

I stayed silent some time because I just found something usable for my 
purpose.
Wanted to wait until it work to inform you.

Unfortunately, I'm confronted to a strange problem.

I use an XSLT transformation. Whan I run this transformation in Xalan, 
It produce a document perfectly.
But when I use it in my sitemap, I have the following error :

"org.apache.cocoon.ProcessingException: Failed to execute pipeline.: 
java.lang.RuntimeException: String index out of range: 145"

My sitemap is just :

"         <map:match pattern="doc.xml">
             <map:generate src="source.xsd"/>
            <map:transform type="xslt" src="xsl/transform.xsl"/>
            <map:serialize type="xml"/>
         </map:match>
    
"

I use cocoon 2.1

Do you know Why such an error can happen ?

-- 
************************************
David Verdin
GES / ENSAR - laboratoire d'informatique
65, rue de St Brieuc
CS 84 215
35 042 Rennes cedex
e-mail : verdin@lilas.roazhon.inra.fr
tél : 02 23 48 54 58
fax : 02 23 48 54 50
************************************


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


Re: Xalan behaviour in cocoon

Posted by David Verdin <ve...@agrocampus-rennes.fr>.
This is the whole full exception chain stacktrace :

Original Exception: java.lang.RuntimeException: String index out of range: 145
	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:56)
	at org.apache.cocoon.transformation.TraxTransformer.endDocument(TraxTransformer.java:549)
	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.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:252)
	at org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:116)
	at org.apache.cocoon.components.pipeline.impl.AbstractCachingProcessingPipeline.processXMLPipeline(AbstractCachingProcessingPipeline.java:260)
	at org.apache.cocoon.components.pipeline.AbstractProcessingPipeline.process(AbstractProcessingPipeline.java:490)
	at org.apache.cocoon.components.treeprocessor.sitemap.SerializeNode.invoke(SerializeNode.java:120)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:103)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
	at org.apache.cocoon.components.treeprocessor.sitemap.MountNode.invoke(MountNode.java:103)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:49)
	at org.apache.cocoon.components.treeprocessor.sitemap.PreparableMatchNode.invoke(PreparableMatchNode.java:130)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelineNode.invoke(PipelineNode.java:126)
	at org.apache.cocoon.components.treeprocessor.AbstractParentProcessingNode.invokeNodes(AbstractParentProcessingNode.java:72)
	at org.apache.cocoon.components.treeprocessor.sitemap.PipelinesNode.invoke(PipelinesNode.java:101)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:336)
	at org.apache.cocoon.components.treeprocessor.TreeProcessor.process(TreeProcessor.java:277)
	at org.apache.cocoon.Cocoon.process(Cocoon.java:639)
	at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1098)
	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(WebApplicationHandler.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(WebApplicationContext.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)


Hope it can help.

Cheers,

David

Andreas Hartmann a écrit :

> David Verdin wrote:
>
>> Hi,
>>
>> I stayed silent some time because I just found something usable for 
>> my purpose.
>> Wanted to wait until it work to inform you.
>>
>> Unfortunately, I'm confronted to a strange problem.
>>
>> I use an XSLT transformation. Whan I run this transformation in 
>> Xalan, It produce a document perfectly.
>> But when I use it in my sitemap, I have the following error :
>>
>> "org.apache.cocoon.ProcessingException: Failed to execute pipeline.: 
>> java.lang.RuntimeException: String index out of range: 145"
>
>
> Would you mind attaching the whole stack trace?
>
> -- Andreas
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>

-- 
************************************
David Verdin
GES / ENSAR - laboratoire d'informatique
65, rue de St Brieuc
CS 84 215
35 042 Rennes cedex
e-mail : verdin@lilas.roazhon.inra.fr
tél : 02 23 48 54 58
fax : 02 23 48 54 50
************************************


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


Re: Xalan behaviour in cocoon

Posted by Andreas Hartmann <an...@apache.org>.
David Verdin wrote:
> Hi,
> 
> I stayed silent some time because I just found something usable for my 
> purpose.
> Wanted to wait until it work to inform you.
> 
> Unfortunately, I'm confronted to a strange problem.
> 
> I use an XSLT transformation. Whan I run this transformation in Xalan, 
> It produce a document perfectly.
> But when I use it in my sitemap, I have the following error :
> 
> "org.apache.cocoon.ProcessingException: Failed to execute pipeline.: 
> java.lang.RuntimeException: String index out of range: 145"

Would you mind attaching the whole stack trace?

-- Andreas


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


Re: Xalan behaviour in cocoon

Posted by David Verdin <ve...@agrocampus-rennes.fr>.
As I'm using a #big# XSLT file, it's effectively not impossible.
I'll try to see what could be be the problem.

Bertrand Delacretaz a écrit :

> Le 30 sept. 04, à 18:38, David Verdin a écrit :
>
>> ...I use an XSLT transformation. Whan I run this transformation in 
>> Xalan, It produce a document perfectly.
>> But when I use it in my sitemap, I have the following error :..
>
>
> Maybe the standalone Xalan that you're using is not the same version 
> than in Cocoon?
>
> The easiest way to find out where this comes from is to comment out 
> parts of your XSLT transform until you find the construct that causes 
> the problem.
>
> Most often, such problems are caused by bugs in the XSLT processors or 
> weird XSLT constructs that are not really correct but are accepted by 
> some versions of the processors.
>
> -- 
>   Bertrand Delacretaz
>   independent consultant, Lausanne, Switzerland
>   http://www.codeconsult.ch
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>
>
>

-- 
************************************
David Verdin
GES / ENSAR - laboratoire d'informatique
65, rue de St Brieuc
CS 84 215
35 042 Rennes cedex
e-mail : verdin@lilas.roazhon.inra.fr
tél : 02 23 48 54 58
fax : 02 23 48 54 50
************************************


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


Re: Xalan behaviour in cocoon

Posted by Bertrand Delacretaz <bd...@apache.org>.
Le 30 sept. 04, à 18:38, David Verdin a écrit :

> ...I use an XSLT transformation. Whan I run this transformation in 
> Xalan, It produce a document perfectly.
> But when I use it in my sitemap, I have the following error :..

Maybe the standalone Xalan that you're using is not the same version 
than in Cocoon?

The easiest way to find out where this comes from is to comment out 
parts of your XSLT transform until you find the construct that causes 
the problem.

Most often, such problems are caused by bugs in the XSLT processors or 
weird XSLT constructs that are not really correct but are accepted by 
some versions of the processors.

--
   Bertrand Delacretaz
   independent consultant, Lausanne, Switzerland
   http://www.codeconsult.ch



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