i would say the easiest way to nail this quick is sneak this piece of code
into perhaps a static {} of a class you know is being loaded before all this
happens:
static {
ClassLoader loader = SomeClass.class.getClassLoader();
System.err.println("Xerces file = " +
loader.getResource("org/apache/xerces/parsers/SAXParser.class"));
}
that'll tell you where the classes are being loaded from. then it's just a
question of removing that jar or figuring out how it got in before your
Xerces2 jar. (next thing i'd look at is
System.getProperty("java.class.path") - if it's not in lib/ext it's got to
be here or someone shoved it into the rt.jar which i'm not sure is possible
(and definately isn't a good idea)).
-----Original Message-----
From: Andy Clark [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 21, 2001 11:27 PM
To: [EMAIL PROTECTED]
Subject: Re: Help, Xerces 2.0 beta install problem
"Swanson, Brion" wrote:
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/xerces/parsers/AbstractDOMParser
> at
com.westgroup.morpheus.filters.dom.XFilter$1.startElement(XFilter.java:155)
> at
org.apache.xerces.parsers.SAXParser.startElement(SAXParser.java:1340)
> at
org.apache.xerces.validators.common.XMLValidator.callStartElement(XMLValidat
or.java:965)
> at
org.apache.xerces.framework.XMLDocumentScanner.scanElement(XMLDocumentScanne
r.java:1858)
> at
org.apache.xerces.framework.XMLDocumentScanner$ContentDispatcher.dispatch(XM
LDocumentScanner.java:1234)
> at
org.apache.xerces.framework.XMLDocumentScanner.parseSome(XMLDocumentScanner.
java:381)
> at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:952)
> at org.apache.xerces.framework.XMLParser.parse(XMLParser.java:991)
The stack trace clearly shows that you are actually using
the Xerces 1.x parser. The Xerces2 parser no longer has any
"...xerces.validators" or "...xerces.framework" packages.
So it must be a classpath problem that you are having. What
kind of environment are you running this under? Is there
any possible way that it could be using the old Xerces JAR
file?
I don't see anything in your code that would be causing the
problem you are seeing. As long as you stick with using the
standard XML interface (DOM, SAX, JAXP, etc), you should be
shielded from any implementation changes.
--
Andy Clark * IBM, TRL - Japan * [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]