[jdom-interest] Unable to load a valid xml document
Jason Hunter
jhunter at collab.net
Fri Dec 15 14:54:51 PST 2000
The answer is in the list archives...
-jh-
Subject:
RE: [jdom-interest] debugging with Visual Cafe 4.0
Date:
Mon, 13 Nov 2000 12:41:57 +0100
From:
ARNULFO Franck <FARNULFO at cpr.fr>
To:
"'Naveen Pasumarthi'" <npasumar at hotmail.com>,
jdom-interest at jdom.org
You must disable the catching of a
java.lang.ArrayIndexOutOfBoundsException
in your VisualCafe Debugger Configuration.
Some parsers (xerces included) uses this exception instead of testing
the end of an array
and IDE's debugger are configured to catch/debug this exception.
If you look at the source on Xerces you can see that this exception is
correctly catched.
Franck Arnulfo
kgoss at interactcommerce.com wrote:
>
> I recently downloaded the JDOM source and sucessfully built the JAR files as
> described in the ReadMe. Following this, I downloaded and referenced the
> Xerces.jar file from apache.org. Although everything compiles fine, I'm
> unable to sucessfully load a document.
> I continue to get the following error:
> main (11:41:34): Exception raised:
> "java.lang.ArrayIndexOutOfBoundsException: 8"
> main (11:41:34): You may press F5 to continue with default exception
> handling)
> VisualCafe (11:41:34): Warning:
> org\apache\xerces\utils\SymbolCache.java(201): Source File not found
> I have referenced both the JDOM and Xerces JAR files... but no luck.
> My code is as follows... and the File object does return true to its
> exists() method... any help is appreciated, thanks
> Kris
> ________________________________
> public static void main(String[] args) {
> ScreenFlowXMLDAO test = new
> ScreenFlowXMLDAO("D;framework;webpages;xml");
> }
>
> /**
> * Default constructor that loads XML files from the specified file path
> */
> public ScreenFlowXMLDAO(String resourcesFilePath) {
> // this builds the documents using SAX and Xerces, no validation
> try {
> DOMBuilder builder = new DOMBuilder();
> File f = new File("requestmappings.xml");
> System.out.println(f.exists());
>
> // load the xml documents
> Document maps = builder.build(new
> File("requestmappings.xml"));
> Document screens = builder.build(new
> File("screendefinitions.xml"));
>
> // "objectify" the xml now into hashmaps
> loadRequestMappings(maps.getRootElement());
> loadScreenDefinitions(screens.getRootElement());
> }
> catch (JDOMException e) {
> if (e.getRootCause() != null) {
> e.getRootCause().printStackTrace();
> }
> else {
> e.printStackTrace();
> }
> }
> catch (Exception e) {
> Debug.print(e);
> }
> }
>
> _______________________________________________
> To control your jdom-interest membership:
> http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com
More information about the jdom-interest
mailing list