Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

IncorrectResultSizeDataAccessException when logging in

Deleted user July 19, 2017

When trying to login to Confluence with our admin account the following error is displayed:

Cause

org.springframework.dao.IncorrectResultSizeDataAccessException: query did not return a unique result: 2
    at org.springframework.orm.hibernate.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:590)

 

I have checked the cwd_users table and there are no duplicate usernames.

What else might I need to check to identify the root cause of this issue?

1 answer

1 vote
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 20, 2017

Hello,

In order to resolve this issue, there are two suggested resolutions from this page:

User login renders 'query did not return a unique result' error

Give both of those suggestions a try and let us know how it goes. You can try resolution #1 first, and if that does not work, try #2, searching the cwd_user table for the specific username that is having the problem.

Let us know if you have any trouble or if the solutions do not correct your issue.

Kind Regards,
Shannon

Deleted user July 20, 2017

Hi @Shannon S!

I had seen that article aready, but as I stated above our cwd_users table does not contain any duplicate usernames.

I cannot try resolution #1 as we only have one administrative user, and that's the one that cannot login.

I cannot try resolution #2 as there are no duplicated usernames in the cwd_table to delete.

Do you have any other suggestions?

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 20, 2017

Hi there,

So this means that the duplicate row is in another table. For example, user_mapping could have a duplicate.

My recommendation to you would be to turn on SQL Logging and then you will be able to see which SQL statement is causing the error.

Let us know how it goes or if you have any follow-up questions.

Kind Regards,
Shannon

Deleted user July 20, 2017

Thanks @Shannon S!

With SQL Logging enabled I was able to indentify that this query was returning two rows:

SELECT
confluence0_.user_key as user_key,
confluence0_.username as username,
confluence0_.lower_username as lower_us3_
FROM
user_mapping confluence0_
WHERE
(confluence0_.lower_username='interconnekt');

I edited the values of username and lower_username on one of the rows, and the issue was resolved.

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 21, 2017

I'm happy to hear the SQL logging was able to help you resolve your issue!

Take care and Kind Regards,
Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events