[jdom-interest] ArrayIndexOutOfBoundsException with JDOMSource.
Eric Hartmann
ehartmann at rhinfo.com
Fri Apr 12 04:03:26 PDT 2002
I've this exception using JDOMb8, Xerces 2.0.1 and Xalan 2.3.1 and JAXP
:
java.lang.ArrayIndexOutOfBoundsException
at
org.apache.xerces.impl.dtd.DTDGrammar.endParameterEntity(DTDGrammar.java
:370)
at
org.apache.xerces.impl.dtd.XMLDTDValidator.endParameterEntity(XMLDTDVali
dator.java:1283)
at
org.apache.xerces.impl.XMLDTDScannerImpl.endEntity(XMLDTDScannerImpl.jav
a:521)
at
org.apache.xerces.impl.XMLEntityManager.endEntity(XMLEntityManager.java:
1159)
at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityMana
ger.java:3204)
at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.load(XMLEntityMana
ger.java:3210)
at
org.apache.xerces.impl.XMLEntityManager$EntityScanner.skipSpaces(XMLEnti
tyManager.java:2905)
at
org.apache.xerces.impl.XMLDTDScannerImpl.skipSeparator(XMLDTDScannerImpl
.java:1892)
at
org.apache.xerces.impl.XMLDTDScannerImpl.scanDecls(XMLDTDScannerImpl.jav
a:1867)
at
org.apache.xerces.impl.XMLDTDScannerImpl.scanDTDExternalSubset(XMLDTDSca
nnerImpl.java:295)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XML
DocumentScannerImpl.java:820)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDo
cumentFragmentScannerImpl.java:333)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardPars
erConfiguration.java:529)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardPars
erConfiguration.java:585)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java
:1148)
at org.jdom.output.SAXOutputter.dtdEvents(SAXOutputter.java:680)
at org.jdom.output.SAXOutputter.output(SAXOutputter.java:597)
at
org.jdom.transform.JDOMSource$DocumentReader.parse(JDOMSource.java:424)
at
org.apache.xml.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.java:3
49)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j
ava:630)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j
ava:1088)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j
ava:1066)
at testXML.main(testXML.java:40)
I've wrote a quite simple test program which raise this exception :
....
TransformerFactory tFactory = TransformerFactory.newInstance();
Templates template = tFactory.newTemplates(new
StreamSource("/test.xsl"));
Transformer processor = template.newTransformer();
processor.transform(new JDOMSource(new Document(new Element("ROOT"), new
DocType("REQUETE", "file:///test.dtd" ))), new
StreamResult(System.out));
....
I've attached a zip file with the main class and the xsl and dtd file.
I saw a similar bug on Xerces that seems to be fixed since Xerces
2.0.0b4 (http://nagoya.apache.org/bugzilla/show_bug.cgi?id=5122).
I'm sorry if I post this to the wrong mailing list but I don't know
whether the bug is in Jdom, Xerces or Xalan (or if I do something
wrong).
Can anyone help me to solve this problem ?
Eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.zip
Type: application/x-zip-compressed
Size: 1110 bytes
Desc: not available
Url : http://jdom.org/pipermail/jdom-interest/attachments/20020412/9b7758c9/test.bin
More information about the jdom-interest
mailing list