0 Replies Latest reply: Feb 14, 2013 10:03 AM by Alejandro Tovar Lanz RSS

    Problem creating a subscriber

    Alejandro Tovar Lanz
      Hi all,

      I am using the OID API provided in the library ldapjclnt11.jar. I am confused since I haven't work with OID before. My requirement are quite simple,

      Create/Update User.
      Create/Update Groups.
      Assign User to Groups.

      However, I am confused about how all this works. I am using the following code to connect to my LDAP as orcladmin
            InitialDirContext ctx = ConnectionUtil.getDefaultDirCtx( "myServer",
                                             "3060",
                                             "cn=orcladmin",
                                             "welcome1" );
      Now, first question, with this InitialDirContext I can do what I need (since I am connected as oracle admin?).

      Second one; I am trying to create a subscriber and no matter what distinguish name I put, I will always get an exception
      mysub = new Subscriber( ctx, Util.IDTYPE_DN, "cn=Users,dc=my_dc", false );
      
      oracle.ldap.util.UtilException: Error in resolving Oracle Context: cn=oraclecontext,cn=Users,dc=my_dc [LDAP: error code 32 - No Such Object]
      If I change my new subscriber to this:

      new Subscriber( ctx, Util.IDTYPE_DN, "dc=com", false );

      it works because I actually have cn=oraclecontext,cn=com.

      Obviously I am not understanding what am I doing and I would really appreciate some orientation here.

      Regards