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=9543>. 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=9543 Iusses with Encoder and Tomcat 4.0.3 Summary: Iusses with Encoder and Tomcat 4.0.3 Product: XalanJ2 Version: CurrentCVS Platform: PC OS/Version: Windows NT/2K Status: NEW Severity: Normal Priority: Other Component: org.apache.xalan.serialize AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] I attempted to use the nightly build of Xalan from 5/22/2002 within Tomcat 4.0.3. I have unjarred build into a web-app. I got a null point ecxception on line 357 of org.apache.xalan.serialized.Encodings.java. I believe the issue is how the Encodings.java is located within tomcats nested class loaders. I debugged a little bit and modified the code, and this is what I saw (See the System.outs) "ST" was blank "BK" showed a tomcat WebAppClass loader which pointed to the WEB-INF\classes directory as it should. It delegeted up several layers as is typical for tomcat. "B" was null "C" was null by moving the location of the file, it was found. TO be fair.. I do not recall if it ws "B" or "C" that found it however. private static EncodingInfo[] loadEncodingInfo() { URL url = null; try { String urlString = System.getProperty("org.apache.xalan.serialize.encodings", ""); System.out.println("ST" + urlString) ; if (urlString == null || urlString.length() == 0) { ClassLoader cl = Encodings.class.getClassLoader(); System.out.println("org/apache/xalan/serialize/" + ENCODINGS_FILE) ; System.out.println("BK" + cl) ; if (cl == null) { url = ClassLoader.getSystemResource("org/apache/xalan/serialize/" + ENCODINGS_FILE); System.out.println("A" + url) ; } else { url = cl.getResource(ENCODINGS_FILE); System.out.println("B" + url) ; if (url == null) url = ClassLoader.getSystemResource("org/apache/xalan/serialize/" + ENCODINGS_FILE); System.out.println("C" + url) ; } } else { url = new URL (urlString); System.out.println("D" + url) ; } // ? consider whether we should allow an exception here if resource // is not found or should we return an empty array ? InputStream is = url.openStream();
