Mega slow email, sorry for the late reply,

Here is the code that does the modify (used to work under OpenLDAP)

LdapContext ctx = JNDIUtils.lookup( LdapContext.class ,
       "external/ldap/gameaccount" );
       LdapRecord record = null;
       LdapContext dir = JNDIUtils.lookup( ctx , "ou=Player" );
Attributes attrs = new BasicAttributes(); BasicAttribute oc = new BasicAttribute( "objectClass" );
       oc.add( "top" );
       oc.add( "person" );
       oc.add( "organizationalPerson" );
       oc.add( "inetOrgPerson" );
       oc.add( "gaPlayer" );
       attrs.put( oc );
       put( attrs , "cn" , alias );
       attrs.put( "userPassword", password.getBytes() );
       dir.modifyAttributes( createLdapName( new Rdn( "cn", alias ) ),
               LdapContext.REPLACE_ATTRIBUTE, attrs );


I also have another issue, this is on startup only, I get the following in my logs

13:19:25,482 INFO [DefaultDirectoryService] ApacheDS shutdown hook has been registered with the runtime. 13:19:26,732 ERROR [DefaultAttributeTypeRegistry] attributeType w/ OID 2.5.4.16 not registered! 13:19:26,890 ERROR [DefaultAttributeTypeRegistry] attributeType w/ OID 1.3.6.1.4.1.32882.1.1.4 not registered! 13:19:26,892 ERROR [DefaultAttributeTypeRegistry] attributeType w/ OID 1.3.6.1.4.1.32882.1.1.4 not registered! 13:19:26,894 ERROR [DefaultAttributeTypeRegistry] attributeType w/ OID 1.3.6.1.4.1.32882.1.1.3 not registered!
13:19:27,091 INFO  [EventInterceptor] Initializing ...
13:19:27,093 INFO  [EventInterceptor] Initialization complete.
13:19:27,231 INFO [LdapService] Successful bind of an LDAP Service (10389) is complete.
13:19:27,231 INFO  [LdapService] Ldap service started.

1.3.6.1.4.1.32882 is our OID, IANA registered..however 2.5.4.16 is postalAddress...Eventhough the OID's say they are not
registered on startup I don't have any issues, so far..


Emmanuel Lecharny wrote:
I will look at the issue.

What exactly are you doing? Replacing the password with a new one ?

2009/6/2 Yiannis Mavroukakis <[email protected]>:
Hello fellow listers :-)

I've come across an odd issue, while trying to modify a single attribute in
LDAP.
If I do a wholemeal change of every attribute in my entry it works fine.
However if I only try to change
the userPassword then it blows up with the following error

3:20:36,026 ERROR [UserActionBean] javax.naming.NamingException: [LDAP:
error code 80 - OTHER: failed for     Modify Request
      Object :
'2.5.4.3=imavroukakis,2.5.4.11=player,0.9.2342.19200300.100.1.25=gameaccount,0.9.2342.19200300.100.1.25=com'
          Modification[0]
              Operation :  replace
              Modification
  objectClass: top
  objectClass: person
  objectClass: organizationalPerson
  objectClass: inetOrgPerson
  objectClass: gaPlayer
          Modification[1]
              Operation :  replace
              Modification
  userPassword: '0x22 ...'
          Modification[2]
              Operation :  replace
              Modification
  cn: imavroukakis
: null:  <-- not sure why this is null!!

Any ideas? I am using the latest trunk.

Thanks,

Yiannis




Reply via email to