org.hibernate.NonUniqueResultException

query did not return a unique result: 2

Solutions on the web55

  • via Atlassian JIRA by James Gorman, 1 year ago
    query did not return a unique result: 2
  • via Atlassian JIRA by Paavo Nugin, 10 months ago
    query did not return a unique result: 2
  • via JIRA by Martin Boulanger, 1 year ago
    query did not return a unique result: 2
  • Stack trace

    • 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)

    Write tip

    You have a different solution? A short tip here would help you and many other users who saw this issue last week.

    Users with the same issue

    Unknown user
    2 times, 7 months ago