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

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Viewing a review will have an error.

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

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:

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.

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.

Last modified on Mar 30, 2016

Was this helpful?

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