You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Daryl Beattie <Da...@screamingmedia.com> on 2001/03/13 18:49:38 UTC

RE: [Xalan-J 2 BUG] ArrayIndexOutOfBoundsException

Dear Carlo,
 
        I believe I can explain the VisualCafé problem; but it is a very
simple solution that involves a setting in VC, so if this is not the
problem, and it does indeed refer to a Xalan problem, disregard this
message. You might try this out, though, to see if the problem goes away.
        Go into Projects | Options | Debugger [tab] | Exceptions [list
option]. Then scroll down and un-check
java.lang.ArrayIndexOutOfBoundsException. When it is checked, the
VC-debugger catches the exception instead of the program. But I have found
that certain parts of Xalan and/or Xerces actually rely on these exceptions
being thrown, and the catching of them, to function correctly.
        Also, with un-patched versions of VC, it seems that this check-box
can reset itself from time to time without warning; the easiest way to catch
this is when you see all sorts of ArrayIndexOutOfBoundsExceptions being
caught by the debugger all of the sudden.
 
Sincerely,
 
        Daryl.
 

-----Original Message-----
From: Carlo [mailto:carlo@empowercorp.co.uk]
Sent: Tuesday, March 13, 2001 12:25 PM
To: xalan-dev@xml.apache.org
Subject: [Xalan-J 2 BUG]



os: NT 4.0
 
jdk1.3-
The files: xalan.jar, xerces.jar and ApplyXPath.class are all in  the
"C:/test" folder.
The following error is returned:
C:\test>java.exe -cp xalan.jar;xerces.jar ApplyXPath foo.xml /
Exception in thread "main" java.lang.NoClassDefFoundError: ApplyXPath
 
The same "ApplyXPath.class" with 
Visual Cafe 3.1 Enterprise Edition-
The following error is returned most times:
Loading classes, parsing foo.xml, and setting up serializer
java.lang.ArrayIndexOutOfBoundsException
        at
org.apache.xerces.utils.SymbolCache.addSymbolToCache(SymbolCache.java:172,
Compiled Code)
        at org.apache.xerces.utils.StringPool.addSymbol(StringPool.java:394,
Compiled Code)
        at
org.apache.xerces.validators.common.XMLValidator.init(XMLValidator.java:1519
)
        at
org.apache.xerces.validators.common.XMLValidator.<init>(XMLValidator.java:40
2, Compiled Code)
        at org.apache.xerces.framework.XMLParser.<init>(XMLParser.java:204)
        at org.apache.xerces.parsers.DOMParser.<init>(DOMParser.java:214)
        at
org.apache.xerces.jaxp.DocumentBuilderImpl.<init>(DocumentBuilderImpl.java:9
8)
        at
org.apache.xerces.jaxp.DocumentBuilderFactoryImpl.newDocumentBuilder(Documen
tBuilderFactoryImpl.java:87)
        at ApplyXPath.doMain(ApplyXPath.java:43, Compiled Code)
        at ApplyXPath.main(ApplyXPath.java:75)
However it usually works when in a new console window but only with the
parameter  "/" and not "/doc/name/@last".
 
Best Regards,
 
Carlo Kaic