|
-----Original Message-----
From: java400-l-bounces+garyp=firstech.com@xxxxxxxxxxxx
[mailto:java400-l-bounces+garyp=firstech.com@xxxxxxxxxxxx] On Behalf Of
Barbara Morris
Sent: Thursday, November 08, 2007 10:37 AM
To: java400-l@xxxxxxxxxxxx
Subject: Re: Java class not found but it's in the default path?
Joe Sam Shirah wrote:
little
I'm not familiar with Scott Klement's JDBC driver, and I'm a
confused by the implication that his (or any custom) driver is injt400.jar.
Regardless, the thing to note is that you are getting a No*ClassDef*
Found error, not a ClassNotFoundException.class
The javadocs for NoClassDefFoundError say: "The searched-for
definition existed when the currently executingI'll refer
class was compiled, but the definition can no longer be found. "
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.