You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by "Ankur Narain Bhardwaj ,Gurgaon" <an...@hcl.in> on 2008/03/03 06:36:39 UTC

RE: java.lang.ArrayIndexOutOfBoundsException: 2048 at XMLEntityScanner.skipSpaces

Hi Michael

Thanks for your help.

ArrayIndexOutOfBoundsException thrown from UTF8Reader.read with the
following stack trace is fixed in the latest Xerces jar and we a code
fix for xerces 2.7.1 jar also

java.lang.ArrayIndexOutOfBoundsException: 2048
	at org.apache.xerces.impl.io.UTF8Reader.read(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.load(Unknown Source)
	at org.apache.xerces.impl.XMLEntityScanner.scanQName(Unknown
Source)
	at
org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown
Source)
	at
org.apache.xerces.impl.XMLNSDocumentScannerImpl$NSContentDispatcher.scan
RootElementHook(Unknown Source)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
	at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn 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 com.TestXerces.main(TestXerces.java:33)
 

However I don't know whether the ArrayIndexOutOfBoundsException
exception thrown from XMLEntityScanner.skipSpaces has been fixed in the
latest Xerces jar. We don't have a stand alone program to replicate this
exception, hence haven't been able to test it

java.lang.ArrayIndexOutOfBoundsException: 2048
at org.apache.xerces.impl.XMLEntityScanner.skipSpaces(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$TrailingMiscDispatcher.dis
patch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn 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.xml.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.java:4
37)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j
ava:699)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j
ava:1284)
at
org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.j
ava:1262)


I assume both ArrayIndexOutOfBoundsExceptions are thrown from different
methods within the different classes, hence their fix should also be
different. We are frequently getting the latter exception, hence need a
standalone program that can be used to replicate it. Can you help us
regarding this?


Thanks and Regards
Ankur Narain Bhardwaj
Lead Engineer
HCL Technologies Ltd.
www.hcltech.com 
www.hcl.in

 
-----Original Message-----
From: Michael Glavassevich [mailto:mrglavas@ca.ibm.com] 
Sent: Saturday, March 01, 2008 4:26 AM
To: j-users@xerces.apache.org
Cc: j-dev@xerces.apache.org
Subject: Re: java.lang.ArrayIndexOutOfBoundsException: 2048 at
XMLEntityScanner.skipSpaces

Hi Ankur,

You say you can't upgrade to the latest version of Xerces, but have you
at
least tried testing whether this bug was fixed? When I execute your test
with Xerces-J 2.9.1 it runs fine. Most likely fixed by this commit [1].

Thanks.

[1] http://marc.info/?l=xerces-cvs&m=118375899720046&w=2

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

"Ankur Narain Bhardwaj ,Gurgaon" <an...@hcl.in> wrote on
02/29/2008 01:10:12 AM:

> Hi ALL
>
> We have a web application which uses Xalan 2.7.0, Xerces 2.7.1 and
> FOP 0.94 to do transformations to HTML, PDF and CSV.  However, after
> recently upgrading to these libraries we have been getting the
> following exception. This is a rare bug probably in the Xerces jar
> that keeps on reappearing. We can?t update to the lastest Xerces
> version due the the amount of testing involved and since FOP is
> recommended to work with these supporting jars.
>
> java.lang.ArrayIndexOutOfBoundsException: 2048
> 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.xml.dtm.ref.DTMManagerDefault.getDTM(DTMManagerDefault.java:4
37)
> at org.apache.xalan.transformer.TransformerImpl.
> transform(TransformerImpl.java:699)
> at org.apache.xalan.transformer.TransformerImpl.
> transform(TransformerImpl.java:1284)
> at org.apache.xalan.transformer.TransformerImpl.
> transform(TransformerImpl.java:1262)
> at btjob.wrap.acr2.compile.ClientReportCompiler.
> transform(ClientReportCompiler.java:436)
> at btjob.wrap.acr2.compile.ClientPDFCompiler.
> transform(ClientPDFCompiler.java:139)
> at btjob.wrap.acr2.compile.ClientReportCompiler.
> compile(ClientReportCompiler.java:623)
> at btjob.wrap.acr2.CompileReportFiles.
> performRequest(CompileReportFiles.java:140)
> at btjob.wrap.acr2.WrapACRJob.performTask(WrapACRJob.java:246)
> at btjob.core.JobRunner.performTask(JobRunner.java:213)
> at btjob.core.MultiThreadedJobRunner$JobThread.
> run(MultiThreadedJobRunner.java:240)
>
>
> We have a fix for the problem with the same exception message (java.
> lang.ArrayIndexOutOfBoundsException: 2048) but having a different
> stack trace. We are able to replicate this using a standalone
> program which is included as an attachment.
>
> Can anyone provide us with a standalone program that is able to
> replicate the above problem with the exact same stack trace? It
> would be a great Help
>
> Thanks and regards
> Ankur Narain Bhardwaj
> Lead Engineer
> HCL Technologies Ltd.
> www.hcl.in
> [image removed]
>
>
> DISCLAIMER:
>
------------------------------------------------------------------------
-----------------------------------------------

> The contents of this e-mail and any attachment(s) are confidential
> and intended for the named recipient(s) only.
> It shall not attach any liability on the originator or HCL or its
> affiliates. Any views or opinions presented in
> this email are solely those of the author and may not necessarily
> reflect the opinions of HCL or its affiliates.
> Any form of reproduction, dissemination, copying, disclosure,
> modification, distribution and / or publication of
> this message without the prior written consent of the author of this
> e-mail is strictly prohibited. If you have
> received this email in error please delete it and notify the sender
> immediately. Before opening any mail and
> attachments please check them for viruses and defect.
>
------------------------------------------------------------------------
-----------------------------------------------
>
> [attachment "TestXerces.java" deleted by Michael
Glavassevich/Toronto/IBM]
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org


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


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