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

Sakai JIRA | Stephen Marquard | 1 decade ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    MC trunk r21389 + performance fixes. One particular user gets this error when clicking on a topic. Other users can read the topic fine. Alert: query did not return a unique result: 2; nested exception is org.hibernate.NonUniqueResultException: query did not return a unique result: 2 catalina.out logs: ERROR: query did not return a unique result: 2; nested exception is org.hibernate.NonUniqueResultException: query did not return a unique result: 2 (2007-03-21 15:46:02,607 TP-Processor140_org.sakaiproject.tool.messageforums.DiscussionForumTool) org.springframework.orm.hibernate3.HibernateSystemException: query did not return a unique result: 2; nested exception is org.hibernate.NonUniqueResultException: 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:762) at org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749) at org.sakaiproject.component.app.messageforums.MessageForumsMessageManagerImpl$9.doInHibernate(MessageForumsMessageManagerImpl.java:355) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366) at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:334) at org.sakaiproject.component.app.messageforums.MessageForumsMessageManagerImpl.findUnreadStatusByUserId(MessageForumsMessageManagerImpl.java:359) at org.sakaiproject.component.app.messageforums.MessageForumsMessageManagerImpl.findUnreadStatus(MessageForumsMessageManagerImpl.java:368) at org.sakaiproject.component.app.messageforums.MessageForumsMessageManagerImpl.isMessageReadForUser(MessageForumsMessageManagerImpl.java:416) at sun.reflect.GeneratedMethodAccessor1607.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176) at $Proxy27.isMessageReadForUser(Unknown Source) at org.sakaiproject.tool.messageforums.DiscussionForumTool.getDecoratedTopic(DiscussionForumTool.java:1864) at org.sakaiproject.tool.messageforums.DiscussionForumTool.displayTopicById(DiscussionForumTool.java:1908) at org.sakaiproject.tool.messageforums.DiscussionForumTool.processActionDisplayTopic(DiscussionForumTool.java:1382) at sun.reflect.GeneratedMethodAccessor15443.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126) at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72) at javax.faces.component.UICommand.broadcast(UICommand.java:312) at javax.faces.component.UIData.broadcast(UIData.java:657) at javax.faces.component.UIData.broadcast(UIData.java:657) at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381) at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:501) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.sakaiproject.tool.messageforums.MessageForumsFilePickerServlet.dispatch(MessageForumsFilePickerServlet.java:151) at org.sakaiproject.jsf.util.JsfTool.doPost(JsfTool.java:256) at javax.servlet.http.HttpServlet.service(HttpServlet.java:709) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:501)

    Sakai JIRA | 1 decade ago | Stephen Marquard
    org.hibernate.NonUniqueResultException: query did not return a unique result: 2
  2. 0

    [#CIB-337] Non-unique result exception - Zutubi

    zutubi.com | 8 months ago
    org.hibernate.NonUniqueResultException: query did not return a unique result: 2
  3. 0

    Can't review harvest - NonUniqueResultException

    GitHub | 1 year ago | obrienben
    org.hibernate.NonUniqueResultException: query did not return a unique result: 2
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Java store room | java web development | Java | Struts | Hibernate : org.hibernate.NonUniqueResultException

    blogspot.com | 8 months ago
    org.hibernate.NonUniqueResultException: query did not return a unique result: 2
  6. 0

    JBoss Community / Mailing Lists

    sourceforge.net | 1 year ago
    org.hibernate.NonUniqueResultException: query did not return a unique result: 2

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.hibernate.NonUniqueResultException

      query did not return a unique result: 2

      at org.hibernate.impl.AbstractQueryImpl.uniqueElement()
    2. Hibernate
      AbstractQueryImpl.uniqueResult
      1. org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:762)
      2. org.hibernate.impl.AbstractQueryImpl.uniqueResult(AbstractQueryImpl.java:749)
      2 frames
    3. org.sakaiproject.component
      MessageForumsMessageManagerImpl$9.doInHibernate
      1. org.sakaiproject.component.app.messageforums.MessageForumsMessageManagerImpl$9.doInHibernate(MessageForumsMessageManagerImpl.java:355)
      1 frame
    4. Hibernate
      HibernateTemplate.execute
      1. org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366)
      2. org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:334)
      2 frames
    5. org.sakaiproject.component
      MessageForumsMessageManagerImpl.isMessageReadForUser
      1. org.sakaiproject.component.app.messageforums.MessageForumsMessageManagerImpl.findUnreadStatusByUserId(MessageForumsMessageManagerImpl.java:359)
      2. org.sakaiproject.component.app.messageforums.MessageForumsMessageManagerImpl.findUnreadStatus(MessageForumsMessageManagerImpl.java:368)
      3. org.sakaiproject.component.app.messageforums.MessageForumsMessageManagerImpl.isMessageReadForUser(MessageForumsMessageManagerImpl.java:416)
      3 frames
    6. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor1607.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    7. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:287)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:181)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:148)
      3 frames
    8. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
      1 frame
    9. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:170)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:176)
      2 frames
    10. Unknown
      $Proxy27.isMessageReadForUser
      1. $Proxy27.isMessageReadForUser(Unknown Source)
      1 frame
    11. org.sakaiproject.tool
      DiscussionForumTool.processActionDisplayTopic
      1. org.sakaiproject.tool.messageforums.DiscussionForumTool.getDecoratedTopic(DiscussionForumTool.java:1864)
      2. org.sakaiproject.tool.messageforums.DiscussionForumTool.displayTopicById(DiscussionForumTool.java:1908)
      3. org.sakaiproject.tool.messageforums.DiscussionForumTool.processActionDisplayTopic(DiscussionForumTool.java:1382)
      3 frames
    12. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor15443.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:585)
      3 frames
    13. JSF
      ActionListenerImpl.processAction
      1. com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
      2. com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
      2 frames
    14. JavaEE 7
      UIViewRoot.processApplication
      1. javax.faces.component.UICommand.broadcast(UICommand.java:312)
      2. javax.faces.component.UIData.broadcast(UIData.java:657)
      3. javax.faces.component.UIData.broadcast(UIData.java:657)
      4. javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
      5. javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
      5 frames
    15. JSF
      LifecycleImpl.execute
      1. com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
      2. com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
      3. com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
      3 frames
    16. JavaEE 7
      FacesServlet.service
      1. javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
      1 frame
    17. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      2 frames
    18. Sakai Component Manager
      RequestFilter.doFilter
      1. org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:501)
      1 frame
    19. Glassfish Core
      ApplicationDispatcher.forward
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      3. org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
      4. org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
      5. org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
      6. org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
      6 frames
    20. org.sakaiproject.tool
      MessageForumsFilePickerServlet.dispatch
      1. org.sakaiproject.tool.messageforums.MessageForumsFilePickerServlet.dispatch(MessageForumsFilePickerServlet.java:151)
      1 frame
    21. org.sakaiproject.jsf
      JsfTool.doPost
      1. org.sakaiproject.jsf.util.JsfTool.doPost(JsfTool.java:256)
      1 frame
    22. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
      2. javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
      2 frames
    23. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
      2 frames
    24. Sakai Component Manager
      RequestFilter.doFilter
      1. org.sakaiproject.util.RequestFilter.doFilter(RequestFilter.java:501)
      1 frame