You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by bu...@apache.org on 2002/04/05 21:16:24 UTC
DO NOT REPLY [Bug 7773] New: -
Can't use xercesImpl.jar inside web app(WAR)
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=7773>.
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=7773
Can't use xercesImpl.jar inside web app(WAR)
Summary: Can't use xercesImpl.jar inside web app(WAR)
Product: Xerces2-J
Version: 2.0.1
Platform: Other
OS/Version: Other
Status: NEW
Severity: Normal
Priority: Other
Component: JAXP
AssignedTo: xerces-j-dev@xml.apache.org
ReportedBy: xerces@mkim.com
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
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org