[ http://issues.apache.org/jira/browse/XALANJ-1043?page=all ]
Brian Minchau updated XALANJ-1043: ---------------------------------- Version: 2.4 (was: Latest Development Code) > Iusses with Encoder and Tomcat 4.0.3 > ------------------------------------ > > Key: XALANJ-1043 > URL: http://issues.apache.org/jira/browse/XALANJ-1043 > Project: XalanJ2 > Type: Bug > Components: Serialization > Versions: 2.4 > Environment: Operating System: Windows NT/2K > Platform: PC > Reporter: Bryan Kearney > Assignee: Xalan Developers Mailing List > > 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(); -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]