April 19, 2014

JNDI Tutorial preparations - missing steps

Hope this blog helps anyone looking at running through Sun/Oracle JNDI tutorials. I had to troubleshoot to get the samples running, and hence putting this blog to help anyone in a similar situation. I was running the samples on the ApacheDS LDAP server, hence I had to make a few changes before the tutorial.ldif loaded correctly. Below are the exact steps I had to follow to make it work.

  1. Download and install ApacheDS; at the time of this writing, the latest available is 2.0.0-m16
  2. Download and install Apache Directory Studio (ADS)
  3. Follow the steps below to connect ADS to the ApacheDS server
  1. Make the necessary changes to tutorials.ldif so that it loads into the ApacheDS.

A partition is a logical grouping of things in an ApacheDS. The above-mentioned file is expected to be loaded into a separate partition. The changes that are being made below affect how the partition is created in ApacheDS.

From : dn: o=JNDITutorial  
To   : dn: o=JNDITutorial,dc=example,dc=com
dn: o=JNDITutorial,dc=example,dc=com  
o: JNDITutorial  
dc: example
objectclass: top  
objectclass: organization  
objectclass: dcObject

You can download the modified file [here][4]

  1. Create a partition on ApacheDS to load the file. Follow the steps below on ADS

Important bit is the Suffix, and it has to match what you choose in step 4.

  1. Once the above steps are complete, you can right-click on any node on the “LDAP Browser” window on ADS and import the file tutorials.ldif

Hopefully above steps will get you on track to completing the JNDI tutorial.

© Nataraj Basappa 2025