renaming a user to a formerly existing user should not cause an exception

Issue #2478 open
Robert Jäschke created an issue

When I try to rename a user account to a user account that existed before (but was renamed), an exception is thrown:

[2015-04-15 08:31:58,327] [ERROR] [org.bibsonomy.webapp.util.spring.controller.MinimalisticControllerSpringWrapper] - Could not complete con
troller (general exception) for request /admin/changeuser?null with referer http://user-rename3.biblicious.org/admin/changeuser
java.lang.RuntimeException: user TEST already exists
        at org.bibsonomy.util.ExceptionUtils.logErrorAndThrowRuntimeException(ExceptionUtils.java:59)
        at org.bibsonomy.database.managers.UserDatabaseManager.updateUserNameForUser(UserDatabaseManager.java:131)
        at org.bibsonomy.database.DBLogic.updateUserName(DBLogic.java:280)
        at org.bibsonomy.webapp.controller.admin.AdminChangeUserNameController.changeUserName(AdminChangeUserNameController.java:140)
        at org.bibsonomy.webapp.controller.admin.AdminChangeUserNameController.workOn(AdminChangeUserNameController.java:93)
        at org.bibsonomy.webapp.controller.admin.AdminChangeUserNameController.workOn(AdminChangeUserNameController.java:54)

in the log files which presented to the admin as

Oooops, something's gone wrong... report error: webmaster@bibsonomy.org

Internal Server Error: java.lang.RuntimeException: user iccs already exists

Instead of this uncontrolled behavior, this case should be handled in the UserRenameController.

Comments (2)

  1. Log in to comment