|
Joe Sam Shirah wrote:
I'm not familiar with Scott Klement's JDBC driver, and I'm a little
confused by the implication that his (or any custom) driver is in
jt400.jar.
Regardless, the thing to note is that you are getting a No *ClassDef*
Found error, not a ClassNotFoundException.
The javadocs for NoClassDefFoundError say: "The searched-for class
definition existed when the currently executing
class was compiled, but the definition can no longer be found. " I'll
refer
you to:
...
Joe Sam, that's interesting. I didn't realize there were two exceptions
associated with class-not-found. (I don't know whether I would have
noticed if I ever got a ClassNotFound instead of a NoClassDefFound.)
I think Scott's code uses JNI to make native method calls to an existing
JDBC driver; I have only ever seen NoClassDefFound when a class is not
found for a native method call. I'm just guessing - maybe the class
loader used by JNI for native method calls goes through the same path as
for method calls in compiled Java classes, so it gives NoClassDefFound.
For example, when I call the following RPG program, which tries to call
method mth() in class NoSuchClass, the call fails with
java.lang.NoClassDefFoundError: NoSuchClass.
D meth pr extproc(*java:'NoSuchClass':'mth')
D static
/free
mth();
return;
--
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.