> From: Mark Leone [mailto:[EMAIL PROTECTED]
> Subject: Non-Sequitor Stack Trace with no log entry
>
> However, the method I'm calling does not throw that exception,
> and I looked at all the relevant source code over and over
> again, and it's simply not possible to hit any code that
> references SOAPException by invoking newDocument().
The NoClassDefFoundError exception can be generated without any explicit
references in the path you're taking. For example, try the following
test program:
class TestReference {
static public void main(String args[]) {
System.out.println("starting up");
if (args.length > 0 && args[0].equals("testing")) {
System.out.println("calling testmethod");
try {
testmethod();
} catch (Exception e) {
System.out.println("Caught " + e);
}
} else {
System.out.println("ignoring testmethod");
}
}
static void testmethod() throws MyException {
throw new MyException("testing");
}
}
class MyException extends Exception {
public MyException(String message) {
super(message);
}
}
If you compile this and then delete MyException.class or make it
otherwise unavailable at run time, you get the NCDFE message during the
linking of TestReference - regardless of any argument specified and
before any code in the TestReference class is actually executed. The
point to note here is that the referenced exception class must be
available at run time, even if that exception is not actually going to
be thrown.
The class of interest (javax.xml.soap.SOAPException) is located in
saaj.jar (part of the Axis download); you'll need to put at least that
in the same directory as axis.jar. There are other jars included with
Axis, so you may need those as well.
- Chuck
THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY
MATERIAL and is thus for use only by the intended recipient. If you
received this in error, please contact the sender and delete the e-mail
and its attachments from all computers.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]