I´m testing my appfuse project and i have founded a exception when i have
updated the username with any user.

¡Data Access Failure  Incorrect result size: expected 1, actual 0!

The exception can be seen in demo´s appfuse web:

http://demo.appfuse.org/appfuse-struts/login.jsp

1) login user/user, admin/admin,...
2) edit user
3) change username
4) save

result: ¡Data Access Failure  Incorrect result size: expected 1, actual 0!


1) login admin/admin,...
2) list users
3) edit user
4) change username
5) save

result: ¡Data Access Failure  Incorrect result size: expected 1, actual 0!

this behaviour is due to:
In class : UserManagerImpl

    public User saveUser(User user) throws UserExistsException {
...
                // Existing user, check password in DB
                String currentPassword =
dao.getUserPassword(user.getUsername());
...

getUserPassword returns null because getUsername is the new username and
this one doesn´t exist in BD

what is the solution?
thanks!

Reply via email to