LDAP: error code 49 - cannot bind the principalDn

Ratha picture Ratha · Oct 2, 2011 · Viewed 6.9k times · Source

I'm a newbie to ApacheDS.I just created a new partition in ApcheDS. When i try to register my connection factory i get above error..(with OracleAQ )

My code is;

    // ldap settings
        env.put(Context.INITIAL_CONTEXT_FACTORY, AQjmsConstants.INIT_CTX_FACTORY);
        env.put(Context.PROVIDER_URL, "ldap://localhost:10389/");
            env.put(Context.SECURITY_PRINCIPAL, "uid=admin,ou=system,dc=acme,dc=com"); 
        env.put(Context.SECURITY_CREDENTIALS, "secret");
        env.put(Context.SECURITY_AUTHENTICATION, "simple");

My LDIF file looks like;

dn: dc=acme,dc=com
objectClass: organization
objectClass: dcObject
objectClass: top
dc: acme
o: Acme,Inc

dn: cn=OracleContext,dc=acme,dc=com
objectClass: orclContext
objectClass: top
cn: OracleContext

dn: cn=db1,cn=OracleContext,dc=acme,dc=com
objectClass: orclContext
objectClass: top
cn: db1

dn: cn=OracleDBConnections,cn=db1,cn=OracleContext,dc=acme,dc=com
objectClass: orclContext
objectClass: top
cn: OracleDBConnections

dn: cn=OracleDBQueue,cn=db1,cn=OracleContext,dc=acme,dc=com
objectClass: orclContext
objectClass: top
cn: OracleDBQueue

What is the wrong with my connection parameters? any help would be appreciate?

Thanks,

Answer

kayyagari picture kayyagari · Oct 2, 2011

Change the bind DN to uid=admin,ou=system instead of uid=admin,ou=system,dc=acme,dc=com (this DN is invalid as per your current server data)