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

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via Sakai JIRA by Stephen Marquard, 1 year ago
query did not return a unique result: 2
via Atlassian JIRA by Renan Battaglin, 1 year ago
query did not return a unique result: 2
via Atlassian JIRA by Renan Battaglin, 1 year ago
query did not return a unique result: 2
via sourceforge.net by Unknown author, 2 years ago
query did not return a unique result: 2
via sourceforge.net by Unknown author, 1 year ago
query did not return a unique result: 2
via Atlassian JIRA by Geoff Crain [Atlassian], 1 year ago
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.sakaiproject.component.app.messageforums.MessageForumsMessageManagerImpl$9.doInHibernate(MessageForumsMessageManagerImpl.java:355)
at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:366)
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:170)
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 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 com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
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.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)

Users with the same issue

Samebug visitor profile picture
Unknown user
2 times, 1 year ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.