History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: APF-980
Type: Bug Bug
Status: Open Open
Priority: Minor Minor
Assignee: Matt Raible
Reporter: René Günther
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
AppFuse

Changing username results in exception

Created: 11/Dec/07 03:15 PM   Updated: 11/Dec/07 04:00 PM
Component/s: Service Layer
Affects Version/s: 2.0.1
Fix Version/s: None

Environment: basic-jsf


 Description  « Hide
username=user
change to
username=newusername

getUserPassword(String username) cant find a password for newusername (should look for username=user) and will throw exception.

Caused by: org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0
at org.springframework.dao.support.DataAccessUtils.requiredSingleResult(DataAccessUtils.java:71)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:697)
at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:707)
at org.springframework.jdbc.core.simple.SimpleJdbcTemplate.queryForObject(SimpleJdbcTemplate.java:151)

 All   Comments   Change History   FishEye      Sort Order:
Matt Raible - 11/Dec/07 03:27 PM
Can you please provide the steps to reproduce this problem?

René Günther - 11/Dec/07 04:00 PM
Sure :-)

0. Go to eg: http://demo.appfuse.org/appfuse-jsf/admin/users.html
1. Login as admin/admin
2. Change profile of user
3. Change the username of the user from "user" to "newusername"
4. Submit form

The method getUserPassword looksup the password for user with username="newusername" which not in the DB yet.