[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xerces-j-dev
Subject:    XNI and DOMParser
From:       Brian Madigan <butane_bob2003 () yahoo ! com>
Date:       2003-01-29 16:58:52
[Download RAW message or body]

using Xerces 2.2.1, the following code throws a null
pointer exception from somewhere inside the DOMParser.


XMLParserConfiguration config =
        new CSVParserConfig( );
        org.apache.xerces.parsers.DOMParser parser =
new 
        org.apache.xerces.parsers.DOMParser (config);
        java.net.URL url =
TestParserConfiguration.class.getResource(filename);
        parser.parse(new XMLInputSource(null,
url.toExternalForm( ), null));

--->stack trace
java.lang.NullPointerException
        at
org.apache.xerces.parsers.AbstractDOMParser.startDocument(Unknown
Source)
        at
com.webdeninteractive.xbotts.Mapping.datasource.CSVParserConfig.parse(CSVParserConfig.java:51)
  at
org.apache.xerces.parsers.XMLParser.parse(Unknown
Source)
        at
com.webdeninteractive.xbotts.Mapping.datasource.TestParserConfiguration.testNewParserConfig(TestParserConfiguration.java:41)
  at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native
Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at
com.webdeninteractive.xbotts.Mapping.datasource.TestParserConfiguration.main(TestParserConfiguration.java:52)



The same code using the SAXParser runs fine. 
CSVParserConfig is the example found in the XNI
manual, with a few modifications to allow it to build
using 2.2.1. Any ideas? 

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

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


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic