You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Chris DeForeest (JIRA)" <xe...@xml.apache.org> on 2010/11/06 01:28:41 UTC

[jira] Updated: (XERCESJ-1471) ArrayIndexOutOfBoundsException in XSLTC when using TransformHandler and a URIResolver

     [ https://issues.apache.org/jira/browse/XERCESJ-1471?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris DeForeest updated XERCESJ-1471:
-------------------------------------

    Attachment: xalan-bug.zip

Simple Java program that reproduces the problem

> ArrayIndexOutOfBoundsException in XSLTC when using TransformHandler and a URIResolver
> -------------------------------------------------------------------------------------
>
>                 Key: XERCESJ-1471
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1471
>             Project: Xerces2-J
>          Issue Type: Bug
>    Affects Versions: 2.7.1
>         Environment: Windows XP; Java 1.6_u19; Xalan 2.7.1.
>            Reporter: Chris DeForeest
>         Attachments: xalan-bug.zip
>
>
> I receive the following ArrayIndexOutOfBoundsException when using the XSLTC transformer:
> Exception in thread "main" javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException: -1
> 	at org.apache.xalan.xsltc.trax.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:243)
> 	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.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
> 	at XalanBug.main(XalanBug.java:36)
> Caused by: javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException: -1
> 	at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:639)
> 	at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:303)
> 	at org.apache.xalan.xsltc.trax.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:240)
> 	... 13 more
> Caused by: java.lang.ArrayIndexOutOfBoundsException: -1
> 	at org.apache.xalan.xsltc.dom.DOMAdapter.getExpandedTypeID(DOMAdapter.java:233)
> 	at org.apache.xalan.xsltc.dom.MultiDOM.getExpandedTypeID(MultiDOM.java:434)
> 	at GregorSamsa.applyTemplates()
> 	at GregorSamsa.template$dot$1()
> 	at GregorSamsa.applyTemplates()
> 	at GregorSamsa.applyTemplates()
> 	at GregorSamsa.transform()
> 	at org.apache.xalan.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:605)
> 	at org.apache.xalan.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:632)
> 	... 15 more
> The problem is somehow related to the combination of TransformHandler, URIResolver and the document() function. It works with XSLTC if I don't supply my own URIResolver. It also works with XSLTC if I use the Transformer.transform() method instead of a TransformHandler. It always works when using the Xalan interpreter (instead of XSLTC). I will attach a condensed example that reproduces the problem.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org