0 Replies Latest reply on Feb 14, 2013 4:03 PM by Alejandro Tovar Lanz

    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",
                                             "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.