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

Samebug tips

Do you know how to solve this issue? Write a tip to help other users and build your expert profile.

Solutions on the web

via JIRA by Martin Boulanger, 1 year 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
via JIRA by Meryam Belhiah, 1 year ago
query did not return a unique result: 2
via JIRA by Meryam Belhiah, 1 year ago
query did not return a unique result: 2
via JIRA by Philippe Laflamme, 1 year ago
query did not return a unique result: 4
via JIRA by Philippe Laflamme, 1 year ago
query did not return a unique result: 4
org.hibernate.NonUniqueResultException: query did not return a unique result: 2
at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:820)
at org.obiba.core.service.impl.hibernate.PersistenceManagerHibernateImpl.matchOne(PersistenceManagerHibernateImpl.java:82)
at sun.reflect.GeneratedMethodAccessor28.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at undefined.$Proxy31.matchOne(Unknown Source)
at org.obiba.onyx.marble.core.service.impl.ConsentServiceImpl.getConsent(ConsentServiceImpl.java:34)
at org.obiba.onyx.marble.engine.MarbleModule.getVariableData(MarbleModule.java:106)
at org.obiba.onyx.engine.variable.VariableDirectory.getVariableData(VariableDirectory.java:165)
at org.obiba.onyx.engine.variable.VariableDirectory.getParticipantData(VariableDirectory.java:124)
at org.obiba.onyx.engine.variable.export.OnyxDataExport.exportCompletedInterviews(OnyxDataExport.java:139)
at org.obiba.onyx.engine.variable.export.OnyxDataExport$$FastClassByCGLIB$$c7571da3.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:700)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.obiba.onyx.engine.variable.export.OnyxDataExport$$EnhancerByCGLIB$$8e7132e5.exportCompletedInterviews()
at org.obiba.onyx.engine.variable.export.OnyxDataExport$$FastClassByCGLIB$$c7571da3.invoke()
at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149)
at WICKET_org.obiba.onyx.engine.variable.export.OnyxDataExport$$EnhancerByCGLIB$$bc0a71de.exportCompletedInterviews()
at org.obiba.onyx.webapp.participant.page.ParticipantSearchPage$ActionFragment$3$1.onClose(ParticipantSearchPage.java:510)
at org.apache.wicket.ajax.AbstractDefaultAjaxBehavior.onRequest(AbstractDefaultAjaxBehavior.java:297)
at org.apache.wicket.request.target.component.listener.BehaviorRequestTarget.processEvents(BehaviorRequestTarget.java:100)
at org.apache.wicket.RequestCycle.processEventsAndRespond(RequestCycle.java:1175)
at org.apache.wicket.RequestCycle.step(RequestCycle.java:1252)
at org.apache.wicket.RequestCycle.steps(RequestCycle.java:1353)
at org.apache.wicket.RequestCycle.request(RequestCycle.java:493)
at org.apache.wicket.protocol.http.WicketFilter.doGet(WicketFilter.java:355)
at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1139)
at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:378)
at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:417)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:230)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:114)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
at org.mortbay.jetty.Server.handle(Server.java:324)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:535)
at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:865)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:539)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)

Users with the same issue

Samebug visitor profile picture
Unknown user
2 times, 10 months ago

Write tip

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