DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22379>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22379 XMLReader.parse() throws NullPointerException when base file name has not the same capitalization Summary: XMLReader.parse() throws NullPointerException when base file name has not the same capitalization Product: Xerces2-J Version: 2.5.0 Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Critical Priority: Other Component: Other AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] This is a really strange error: I process an XML file and it works fine - as long as I type the file name of the XML file with the correct capitalized letters! E.g. I have a XML file "RVT_0306.XML". I read the file and also check if the file exists via File = new File("RVT_0306.XML"); if (file.exists()) { ... ) But if i load the file e.g. with a small 't': File = new File("RVt_0306.XML"); this exception occurs. On the other hand, a changed letters of the suffix does not create the NullPointerException: File = new File("RVT_0306.Xml"); works. The Exception is: ----------- java.lang.NullPointerException at weblogic.apache.xerces.framework.XMLParser.parse(XMLParser.java:988) at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:123) at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:125) at xml.XMLLoader.processDocument(XMLLoader.java:124) -------------- the method XMLLoader.processDocument() is here: -------- public void processDocument() throws Exception { try { isLoaderActive = true; // Create a JAXP SAXParserFactory and configure it SAXParserFactory spf = SAXParserFactory.newInstance(); //Use the default (non-validating) parser spf.setValidating(true); // Create a JAXP SAXParser SAXParser saxParser = spf.newSAXParser(); // Get the encapsulated SAX XMLReader XMLReader xmlReader = saxParser.getXMLReader(); xmlReader.setContentHandler(this); xmlReader.setDTDHandler(this); xmlReader.setEntityResolver(this); xmlReader.setErrorHandler(this); xmlReader.parse(new InputSource (inputStream)); //NullPointerException!!! } catch (Exception e) { e.printStackTrace(System.err); throw new Exception("XMLLoader.processDocument(): " + e); } finally { isLoaderActive = false; } }//processDocument() ------------- This error occurs on WIndows NT 4.0 (SP 6) and also on WIndows 2000 (SP3). --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
