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


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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to