You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@directory.apache.org by Amit Vijayant <am...@rapt.com> on 2007/05/07 21:39:42 UTC

Cannot update password as well as attributes in embedded ApacheDS

Hi,

 

Am using ApacheDS by embedding the same in my webapp. Naturally want to
update the password from default 'secret'. Am also making use of
LdapTemplate (http://ldaptemplate.sourceforge.net/) to communicate with
ApacheDS.

 

The piece of code updating any attribute (as well as password) looks
like:

 

    public void update(User p) throws Exception {

        Name dn = buildUserDn(p);

        DirContextAdapter context =

                (DirContextAdapter)_ldapTemplate.lookup(dn);

        mapToContext(p, context);

        _ldapTemplate.modifyAttributes(dn,

                context.getModificationItems());

    }

 

This works without any errors and on connecting to ApacheDS via say
JXplorer shows me the updates. However as soon as I bring ApacheDS down
(and restart) , the changes are lost :-(

 

Why is ApacheDS not persisting the updates??? What am I missing here?

 

P.S. I also upgraded to latest ApacheDS 1.5 still no luck

 

Thanks


Re: Cannot update password as well as attributes in embedded ApacheDS

Posted by Emmanuel Lecharny <el...@apache.org>.
Amit Vijayant a écrit :

>Hi,
>  
>
Hi Amit,

> 
>
>Am using ApacheDS by embedding the same in my webapp. Naturally want to
>update the password from default 'secret'. Am also making use of
>LdapTemplate (http://ldaptemplate.sourceforge.net/) to communicate with
>ApacheDS.
>
> 
>
>The piece of code updating any attribute (as well as password) looks
>like:
>
> 
>
>    public void update(User p) throws Exception {
>
>        Name dn = buildUserDn(p);
>
>        DirContextAdapter context =
>
>                (DirContextAdapter)_ldapTemplate.lookup(dn);
>
>        mapToContext(p, context);
>
>        _ldapTemplate.modifyAttributes(dn,
>
>                context.getModificationItems());
>
>    }
>
> 
>
>This works without any errors and on connecting to ApacheDS via say
>JXplorer shows me the updates. 
>
We also have a LdapBrowser : LdapStudio 
(http://directory.apache.org/ldapstudio/)

>However as soon as I bring ApacheDS down
>(and restart) , the changes are lost :-(
>
> 
>
>Why is ApacheDS not persisting the updates??? What am I missing here?
>  
>
We have fixed this bug in 1.0 and 1.5 branches, but we still have to 
release those versions. What you can do is to build the trunk so that 
you can test the server and check that your problem has been fixed.

FYI, 1.0.2 will be released soon (it's a question of days)

Thanks !