directory-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ioannis Mavroukakis <imavrouka...@gameaccount.com>
Subject Re: Weird error when modifying a single attribute
Date Tue, 02 Jun 2009 20:58:20 GMT
Emamanuel, don't worry I found the mistake..worst case of pebcak on my  
behalf ever it's almost
embarassing..apologies to have wasted your time
On 2 Jun 2009, at 19:27, Ioannis Mavroukakis wrote:

> Sure, is this project in the main trunk?
>
>
> On 2 Jun 2009, at 18:43, Emmanuel Lecharny wrote:
>
>> Yiannis Mavroukakis wrote:
>>> 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 have the same test working (slightly different, nut not that  
>> much) :
>>
>>      try
>>      {
>>          DirContext systemCtx = ( DirContext )  
>> getWiredContext( ldapService ).lookup( "ou=system" );
>>          String rdn = "cn=Kate Bush";
>>            Attributes attrs = new BasicAttributes();
>>          BasicAttribute oc = new BasicAttribute( "objectClass" );
>>          oc.add( "top" );
>>          oc.add( "person" );
>>          oc.add( "organizationalPerson" );
>>          oc.add( "inetOrgPerson" );
>>          attrs.put( oc );
>>          attrs.put( "cn" , "Kate Bush" );
>>          attrs.put( "userPassword", "test".getBytes() );
>>          systemCtx.modifyAttributes( rdn,
>>                    LdapContext.REPLACE_ATTRIBUTE, attrs );
>>      }
>>
>> Can you add your own test in the server-integ project (operations - 
>> > modify) and give us the result ?
>>
>> Thanks !
>>
>> -- 
>> --
>> cordialement, regards,
>> Emmanuel L├ęcharny
>> www.iktek.com
>> directory.apache.org
>>
>>
>>
>> ______________________________________________________________________
>> This email has been scanned by the MessageLabs Email Security System.
>> For more information please visit http://www.messagelabs.com/email  
>> ______________________________________________________________________
>
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email______________________________________________________________________
>
> ______________________________________________________________________
> This email has been scanned by the MessageLabs Email Security System.
> For more information please visit http://www.messagelabs.com/email______________________________________________________________________


Mime
View raw message