[ https://issues.apache.org/jira/browse/XERCESJ-263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Michael Glavassevich resolved XERCESJ-263. ------------------------------------------ Resolution: Invalid Assignee: (was: Xerces-J Developers Mailing List) The parser being returned from SAXParserFactory.newInstance() is Crimson. Whatever the issue was here (probably a bad ClassLoader setup?) it wasn't in Xerces because it wasn't even getting loaded. > Can't use xercesImpl.jar inside web app(WAR) > -------------------------------------------- > > Key: XERCESJ-263 > URL: https://issues.apache.org/jira/browse/XERCESJ-263 > Project: Xerces2-J > Issue Type: Bug > Components: JAXP (javax.xml.parsers) > Affects Versions: 2.0.1 > Environment: Operating System: Linux > Platform: All > Reporter: Myung Kim > > Hi! > I have a web application that has its own classloader and uses xerces with > JAXP. > When I run the web app with tomcat 3.3 and jdk 1.3.1, I get the following > exception. > java.lang.ClassCastException: org.apache.crimson.jaxp.SAXParserFactoryImpl > at javax.xml.parsers.SAXParserFactory.newInstance(Unknown Source) > at ... > Here is my code > SAXParserFactory spf = SAXParserFactory.newInstance(); > spf.setNamespaceAware(true); > spf.setValidating(true); > SAXParser parser = spf.newSAXParser(); // <---- here is where the > exception that get thrown. > Looks like findClassLoader method in following two classes is returning the > system classloader not the classloader that loaded the classes from. > org/apache/xerces/util/ObjectFactory.java > javax/xml/parsers/FactoryFinder.java > Are there ways to tell xerces to use the classloader that loaded xerces > instead > of getting the default system classloader to load META- > INF/services/org.apache.xerces.xni.parser.XMLParserConfiguration? > Thanks in advance. > Myung Kim -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org For additional commands, e-mail: j-dev-h...@xerces.apache.org