JNDI Tutorial preparations - missing steps | Day in my life

April 19, 2014

JNDI Tutorial preparations - missing steps

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

  1. Download and install ApacheDS, at time of this writing latest available is 2.0.0-m16
  2. Download and install Apache Directory Studio (ADS)
  3. Follow below steps to connect ADS to 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 a ApacehDS. The above mentioned file expects to be loaded into a separate partition. The changes that are being made below affects how 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 rightly modified file [here][4]

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

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

  1. Once 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 2021