Unable to view a review - query did not return a unique result: 2

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Symptoms

Viewing a review will have an error.

The following appears in the atlassian-fisheye-<date>.log:

1 2 3 4 5 6 2013-09-26 09:34:00,341 INFO [btpool0-128 ] fisheye.app TotalityFilter-logCause - Cause: query did not return a unique result: 2 org.hibernate.NonUniqueResultException: query did not return a unique result: 2 at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:868) at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:859) at com.cenqua.crucible.model.managers.impl.DefaultReviewManager.getReviewByPermaId(DefaultReviewManager.java:835) at com.atlassian.crucible.actions.ReviewBaseAction.getReview(ReviewBaseAction.java:201)

Diagnosis

Run the following SQL query to check if there is more than one result:

1 SELECT * FROM cru_revpermaid WHERE LOWER(cru_proj_key)='<project_key>' AND cru_number=<review_number>; 

Cause

There are two projects with the same lowercase project key.

Solution

Resolution

Edit the Project Key at Administration > Project Settings > Projects > Edit Crucible Settings for one of the project with the same lowercase project key so that it will have different lowercase project key.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.