1.)
I develope on my local machine and I am trying to lookuo a organizational
unit on my machine.
I am working with windows server 2000 and active directory. I have an OU named sales. And when I run the following program:
**************************************************
import javax.naming.*;
public class JNDILookupAny
{
public static void main(
String[] args) {
if (args.length !=1) {
System.err.println ("Usage: JNDILookupAny JNDIname");
System.exit(1);
}
try {
Context ic = new InitialContext();
Object o = ic.lookup(args[0]);
System.out.println(args[0]+"="+0);
}
catch (NamingException ex) {
System.err.println("Nameexcp: "+ex);
System.exit(1);
}
catch (ClassCastException ex) {
System.err.println("classcast: "+ex);
System.exit(1);
}
}
}
*************************************************
I run the program with the following parameter.
java JNDILookupAny "ou=sales". I get the following error
javax.naming.NameNotFoundException: "ou=sales"
2.) My DSN is bill.zone.com and I set up a properties file withe the follwing lines:
java.naming.factory.inirial=com.zone.bill.naming.SerialInitContextFactory
java.naming.provider.url=localhost:1099
java.naming.factory.url.pkgs=com.zone.bill.naming
is this correct?