Thursday, August 30, 2001 03:20 PM
I have continued to play around with it, but
am coming to wonder whether the JDK 1.22 on AS/400 supports standard
extensions, or what are now called optional packages, which would NOT
necessitate my modifying the CLASSPATH variable in this case.
In any case, I have added to my CLASSPATH environment variable, the
following two paths: "/QIBM/ProdData/Java400/lib/ext/ibmjndi.jar", and
Now I can compile and run without problems the
com.ldr.ldap.LDAPLookup.class under JDK 1.1.8 (note, not JDK 1.2)! I can
also compile in JDK 1.2, but when I try to run in JDK 1.22 (after
compiling successfully), it gives me the same ERROR as before. And using
the "-verbose" option tells me that it cannot load the
So there is something about the JDK 1.22 runtime that is not working
correctly, it seems to me. Or probably it is still my ignorance. Or
maybe there is a class in the path before jndi.jar that is conflicting.
But I've looked, so far, at sun.boot.class.path and
os400.boot.class.path. There IS a different jndi.jar in
/QIBM/ProdData/Java400/ext, which is listed as second of 2 entries in
the java.ext.dirs System properties. But I've examined its internals and
it does have an InitialContext.class in javax/naming, so that cannot be
the cause of the NoClassDefFoundError.
I found a document on IBM's site at
called "IBM JNDI LDAP Provider Programming Guide" that states jndi.jar
and ibmjndi.jar must be included in the classpath and they require SDK
or JRE 1.2.2 or higher. (That they say "make sure ... included in
classpath" seems to indicate that JDK 1.22 on AS/400 is not supporting
the optional packages, or extension mechanism.)
But even "stranger" is that with these same two JARs in the classpath
(env variable), I can compile and run the LDAPLookup class IN JDK 1.18!
without problems. Another mystery, in that it is said clearly in
document that the two jars require JDK 1.2.2
Any ideas, comments, suggestions?