Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

System error: org.hibernate.NonUniqueResultException: query did not return a unique result: 2

Crowd is throwing an error regards querying with Hibernate

org.hibernate.NonUniqueResultException: query did not return a unique result: 2

 

Stack trace:

org.hibernate.NonUniqueResultException: query did not return a unique result: 2 at org.hibernate.query.internal.AbstractProducedQuery.uniqueElement(AbstractProducedQuery.java:1487) at org.hibernate.query.internal.AbstractProducedQuery.uniqueResult(AbstractProducedQuery.java:1457)

......

System information

Referer:

http://ptkpl-crowd:8095/crowd/console/secure/directory/browse.action

Build information:

Version: 3.2.0 (Build:#917 - 2018-04-20)

Memory information:

Total memory: 499 MB
Free memory: 109 MB
Used memory: 389 MB

Request information:

Request attributes:

  • com.atlassian.johnson.filters.JohnsonFilter_already_filtered: true
  • licencecheck.FILTERED: true
  • javax.servlet.forward.context_path: /crowd
  • org.springframework.web.context.request.async.WebAsyncManager.WEB_ASYNC_MANAGER: org.springframework.web.context.request.async.WebAsyncManager@72de4058
  • (inner bean)#369e589b.FILTERED: true
  • com.opensymphony.sitemesh.APPLIED_ONCE: true
  • __spring_security_session_mgmt_filter_applied: true
  • com.atlassian.crowd.integration.http.HttpAuthenticator.REQUEST_SSO_COOKIE_COMMITTED: true
  • struts.actionMapping: ActionMapping{name='viewconnector', namespace='/console/secure/directory', method='null', extension='action', params={}, result=null}
  • __cleanup_recursion_counter: 1
  • __spring_security_scpf_applied: true
  • struts.valueStack: com.opensymphony.xwork2.ognl.OgnlValueStack@154b2999
  • struts.view_uri: /console/500.jsp
  • javax.servlet.forward.servlet_path: /console/secure/directory/viewconnector.action
  • javax.servlet.forward.query_string: ID=557062
  • org.springframework.security.web.FilterChainProxy.APPLIED: true
  • __spring_security_filterSecurityInterceptor_filterApplied: true
  • open-session-in-view.FILTERED: true
  • javax.servlet.forward.mapping: org.apache.catalina.core.ApplicationMapping$MappingImpl@7f32fce4
  • B3-TraceId: dd58363b58a149
  • struts.request_uri: /crowd/console/secure/directory/viewconnector.action
  • crowd.token_key: ********
  • javax.servlet.forward.request_uri: /crowd/console/secure/directory/viewconnector.action
  • charsetFilter.FILTERED: true
  • nodeInformationFilter.FILTERED: true

Request parameters:

  • ID: 557062

 

3 answers

The Answer:
Postgre Cluster with 2 slave databases,  and 1 master.

the Crowd queries the available free pool, and updates it.

while, the master needs to query its slaves regardless of Atlassian Crowd in some timely manner.

When this situation occured:

Crowd syncs directory A, it gets into slave1 at 17:01
Crowd syncs directory A, again, it gets into slave2 at 18:01

Postgre Master syncs to the slaves, getting 2 instances of directory A, at 19:01

Postgre master syncs the slave, pushing to them new directory A instances, at 19:02

Crowd displays log errors, because non unique directory, at 19:03

Solution: I remove one of the Postgre slaves, hoping that it will not get overloaded by requests.

Im on a PostgreDB.

Ill see next week how to solve this, and add the erroneous log files to a ticket in crowd support.

0 votes
Marcin Kempa Atlassian Team May 08, 2018

Hi @ofir gutmacher

 

Thanks for reporting that. Is there anything else in the log files? Without more context it is hard to figure out what may be the culprit. Crowd support should assist you with this problem.

 

Best Regards,

Marcin Kempa

Marcin Kempa Atlassian Team May 09, 2018

Hi @ofir gutmacher,

 

Did you manage to resolve the issue or contact Atlassian Support?

Are you running on MySql database? If so maybe this KB article would help you https://confluence.atlassian.com/crowdkb/synchronization-of-crowd-results-in-error-query-did-not-return-a-unique-result-254739329.html

 

Best Regards,

Marcin Kempa

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

70 views 1 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you