Unable to View Page History because of User with Multiple Display Names

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

User is unable to view a page or History of a page.

The following appears in the atlassian-confluence.log:

org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getUserFullName' in class com.atlassian.confluence.pages.actions.ViewPreviousVersionsAction threw exception org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2 at template/includes/macros.vm[line 125, column 22]
at org.apache.velocity.runtime.parser.node.ASTMethod.handleInvocationException(ASTMethod.java:337)
caused by: org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2
at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:590)

Diagnosis

Run the following query to identify whether you're encountering the exact problem mentioned in this KB Article:

select * from cwd_user where display_name in (select display_name from cwd_user where id in (select id from cwd_user group by display_name having count(id) <> 1)) order by display_name;

If the result is more than one, please proceed to the resolution. Otherwise, please contact Atlassian Support to get better assistance.

Cause

There's no known cause at the moment.

Resolution

  • Backup your database
  • Delete all the duplicate users in the query result of Diagnosis section

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.