This week's giveaway is in the OCPJP forum.
We're giving away four copies of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) and have Paul Anilprem on-line!
See this thread for details.
Win a copy of Practice Tests for OCP Java 17 Certification Exam (1Z0-829) this week in the OCPJP forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Junilu Lacar
  • paul wheaton
Saloon Keepers:
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Scott Selikoff
Bartenders:
  • Piet Souris
  • Jj Roberts
  • fred rosenberger

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
 
reply
    Bookmark Topic Watch Topic
  • New Topic