• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Help from LDAP Guru

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey folks.
I need help please.
I have read a lot about JNDI and I want to get some practical expereince.
I am running WinXP and I want to connect to the active directory.
the code :
Hashtable env = new Hashtable( );
env.put(Context.INITIAL_CONTEXT_FACTORY, "com.sun.jndi.ldap.LdapCtxFactory");
env.put(Context.PROVIDER_URL, "ldap://localhost:389");
DirContext cir = new InitialDirContext(env);
running the code, I got a communication exception (connection refused)
which ofcourse indicates that there is no such service running.
any ideas ?
all the tutorials said you can test LDAP inside the localhost !
I am using FAT32, any problem with this ?
help is really appreicated because my brain's cells are burnning.
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I don't know anything about XP. However, in some circumstances, an anonymous connection to the directory server is not permitted. Depending on whether XP requires it, you may need to specify an administrator name and password to make the connection. Since I am trying to implement a jndi realm in Tomcat, I don't have the java code available for you, however my keywords are used like this:
connectionName="CN=AdminName,OU=CO,dc=mycompany,dc=mydotcom"
connectionPassword="AdminNamesPassword"

If you googled for LDAP and connectionName you may find an example of code. I've seen them out there.

Best wishes
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic