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

JIRA | Philippe Laflamme | 8 years ago
  1. 0

    Having a stage dependency condition such as this one: <variableCondition> <stageName>CIPreliminaryQuestionnaire</stageName> <variablePath>/Onyx/CIPreliminaryQuestionnaire/STAGE_STATUS/SH_CI/active</variablePath> <operator>ne</operator> <data> <type>BOOLEAN</type> <value class="boolean">true</value> </data> </variableCondition> Throws a org.hibernate.NonUniqueResultException when the participant has not yet answered the questionnaire. The full stack trace was: org.hibernate.NonUniqueResultException: query did not return a unique result: 4 at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:820) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305) at org.obiba.core.service.impl.hibernate.PersistenceManagerHibernateImpl.matchOne(PersistenceManagerHibernateImpl.java:82) at sun.reflect.GeneratedMethodAccessor21.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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy30.matchOne(Unknown Source) at org.obiba.onyx.quartz.core.service.impl.hibernate.QuestionnaireParticipantServiceHibernateImpl.isQuestionActive(QuestionnaireParticipantServiceHibernateImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy39.isQuestionActive(Unknown Source) at org.obiba.onyx.quartz.engine.variable.impl.DefaultQuestionToVariableMappingStrategy.getVariableData(DefaultQuestionToVariableMappingStrategy.java:205) at org.obiba.onyx.quartz.engine.QuartzModule.getVariableData(QuartzModule.java:213) at org.obiba.onyx.engine.variable.VariableDirectory.getVariableData(VariableDirectory.java:162) at org.obiba.onyx.engine.VariableStageDependencyCondition.isDependencySatisfied(VariableStageDependencyCondition.java:74) at org.obiba.onyx.engine.MultipleStageDependencyCondition.isDependencySatisfied(MultipleStageDependencyCondition.java:85) at org.obiba.onyx.engine.state.AbstractStageState.areDependenciesCompleted(AbstractStageState.java:93) at org.obiba.onyx.engine.state.AbstractStageState.onTransition(AbstractStageState.java:78) at org.obiba.onyx.engine.state.StageExecutionContext.onTransition(StageExecutionContext.java:219) at org.obiba.onyx.engine.state.StageExecutionContext.castEvent(StageExecutionContext.java:116) at org.obiba.onyx.engine.state.AbstractStageState.castEvent(AbstractStageState.java:99) at org.obiba.onyx.engine.state.AbstractStageState.onTransition(AbstractStageState.java:87) at org.obiba.onyx.engine.state.StageExecutionContext.onTransition(StageExecutionContext.java:219) at org.obiba.onyx.engine.state.StageExecutionContext.castEvent(StageExecutionContext.java:116) at org.obiba.onyx.engine.state.AbstractStageState.castEvent(AbstractStageState.java:99) at org.obiba.onyx.marble.engine.state.MarbleInProgressState.complete(MarbleInProgressState.java:47) at org.obiba.onyx.engine.state.StageExecutionContext.complete(StageExecutionContext.java:173) at org.obiba.onyx.engine.ActionType$2.act(ActionType.java:36) at org.obiba.onyx.core.service.impl.DefaultActiveInterviewServiceImpl.doAction(DefaultActiveInterviewServiceImpl.java:143) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy45.doAction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:149) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy34.doAction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416) at org.apache.wicket.proxy.$Proxy43.doAction(Unknown Source) at org.obiba.onyx.wicket.action.ActionWindow$2.onClose(ActionWindow.java:59) [...]

    JIRA | 8 years ago | Philippe Laflamme
    org.hibernate.NonUniqueResultException: query did not return a unique result: 4
  2. 0

    Having a stage dependency condition such as this one: <variableCondition> <stageName>CIPreliminaryQuestionnaire</stageName> <variablePath>/Onyx/CIPreliminaryQuestionnaire/STAGE_STATUS/SH_CI/active</variablePath> <operator>ne</operator> <data> <type>BOOLEAN</type> <value class="boolean">true</value> </data> </variableCondition> Throws a org.hibernate.NonUniqueResultException when the participant has not yet answered the questionnaire. The full stack trace was: org.hibernate.NonUniqueResultException: query did not return a unique result: 4 at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:820) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305) at org.obiba.core.service.impl.hibernate.PersistenceManagerHibernateImpl.matchOne(PersistenceManagerHibernateImpl.java:82) at sun.reflect.GeneratedMethodAccessor21.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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy30.matchOne(Unknown Source) at org.obiba.onyx.quartz.core.service.impl.hibernate.QuestionnaireParticipantServiceHibernateImpl.isQuestionActive(QuestionnaireParticipantServiceHibernateImpl.java:85) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy39.isQuestionActive(Unknown Source) at org.obiba.onyx.quartz.engine.variable.impl.DefaultQuestionToVariableMappingStrategy.getVariableData(DefaultQuestionToVariableMappingStrategy.java:205) at org.obiba.onyx.quartz.engine.QuartzModule.getVariableData(QuartzModule.java:213) at org.obiba.onyx.engine.variable.VariableDirectory.getVariableData(VariableDirectory.java:162) at org.obiba.onyx.engine.VariableStageDependencyCondition.isDependencySatisfied(VariableStageDependencyCondition.java:74) at org.obiba.onyx.engine.MultipleStageDependencyCondition.isDependencySatisfied(MultipleStageDependencyCondition.java:85) at org.obiba.onyx.engine.state.AbstractStageState.areDependenciesCompleted(AbstractStageState.java:93) at org.obiba.onyx.engine.state.AbstractStageState.onTransition(AbstractStageState.java:78) at org.obiba.onyx.engine.state.StageExecutionContext.onTransition(StageExecutionContext.java:219) at org.obiba.onyx.engine.state.StageExecutionContext.castEvent(StageExecutionContext.java:116) at org.obiba.onyx.engine.state.AbstractStageState.castEvent(AbstractStageState.java:99) at org.obiba.onyx.engine.state.AbstractStageState.onTransition(AbstractStageState.java:87) at org.obiba.onyx.engine.state.StageExecutionContext.onTransition(StageExecutionContext.java:219) at org.obiba.onyx.engine.state.StageExecutionContext.castEvent(StageExecutionContext.java:116) at org.obiba.onyx.engine.state.AbstractStageState.castEvent(AbstractStageState.java:99) at org.obiba.onyx.marble.engine.state.MarbleInProgressState.complete(MarbleInProgressState.java:47) at org.obiba.onyx.engine.state.StageExecutionContext.complete(StageExecutionContext.java:173) at org.obiba.onyx.engine.ActionType$2.act(ActionType.java:36) at org.obiba.onyx.core.service.impl.DefaultActiveInterviewServiceImpl.doAction(DefaultActiveInterviewServiceImpl.java:143) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy45.doAction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 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:149) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy34.doAction(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416) at org.apache.wicket.proxy.$Proxy43.doAction(Unknown Source) at org.obiba.onyx.wicket.action.ActionWindow$2.onClose(ActionWindow.java:59) [...]

    JIRA | 8 years ago | Philippe Laflamme
    org.hibernate.NonUniqueResultException: query did not return a unique result: 4
  3. 0

    Steps to reproduce (run with onyx-1.0): 1) Import the attached database dump in MySql using the MySql administrator tool 2) Log in onyx using administrator/password 3) Receive a new participant 4) Refuse consent CRASH! Stack trace: 2009-02-20 15:11:47,171 - ERROR - apache.wicket.RequestCycle - query did not return a unique result: 4 org.hibernate.NonUniqueResultException: query did not return a unique result: 4 at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:820) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305) at org.obiba.core.service.impl.hibernate.PersistenceManagerHibernateImpl.matchOne(PersistenceManagerHibernateImpl.java:82) at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy74.matchOne(Unknown Source) at org.obiba.onyx.quartz.core.service.impl.hibernate.QuestionnaireParticipantServiceHibernateImpl.isQuestionActive(QuestionnaireParticipantServiceHibernateImpl.java:85) at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy83.isQuestionActive(Unknown Source) at org.obiba.onyx.quartz.engine.variable.impl.DefaultQuestionToVariableMappingStrategy.getVariableData(DefaultQuestionToVariableMappingStrategy.java:205) at org.obiba.onyx.quartz.engine.QuartzModule.getVariableData(QuartzModule.java:213) at org.obiba.onyx.engine.variable.VariableDirectory.getVariableData(VariableDirectory.java:162) at org.obiba.onyx.engine.VariableStageDependencyCondition.isDependencySatisfied(VariableStageDependencyCondition.java:74) at org.obiba.onyx.engine.MultipleStageDependencyCondition.isDependencySatisfied(MultipleStageDependencyCondition.java:85) at org.obiba.onyx.engine.state.AbstractStageState.areDependenciesCompleted(AbstractStageState.java:93) at org.obiba.onyx.engine.state.AbstractStageState.onTransition(AbstractStageState.java:78) at org.obiba.onyx.engine.state.StageExecutionContext.onTransition(StageExecutionContext.java:219) at org.obiba.onyx.engine.state.StageExecutionContext.castEvent(StageExecutionContext.java:116) at org.obiba.onyx.engine.state.AbstractStageState.castEvent(AbstractStageState.java:99) at org.obiba.onyx.engine.state.AbstractStageState.onTransition(AbstractStageState.java:87) at org.obiba.onyx.engine.state.StageExecutionContext.onTransition(StageExecutionContext.java:219) at org.obiba.onyx.engine.state.StageExecutionContext.castEvent(StageExecutionContext.java:116) at org.obiba.onyx.engine.state.AbstractStageState.castEvent(AbstractStageState.java:99) at org.obiba.onyx.marble.engine.state.MarbleInProgressState.complete(MarbleInProgressState.java:47) at org.obiba.onyx.engine.state.StageExecutionContext.complete(StageExecutionContext.java:173) at org.obiba.onyx.engine.ActionType$2.act(ActionType.java:36) at org.obiba.onyx.core.service.impl.DefaultActiveInterviewServiceImpl.doAction(DefaultActiveInterviewServiceImpl.java:143) at sun.reflect.GeneratedMethodAccessor232.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy130.doAction(Unknown Source) at sun.reflect.GeneratedMethodAccessor232.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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:149) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy78.doAction(Unknown Source) at sun.reflect.GeneratedMethodAccessor232.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416) at org.apache.wicket.proxy.$Proxy127.doAction(Unknown Source) at org.obiba.onyx.wicket.action.ActionWindow$2.onClose(ActionWindow.java:59) at org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow$WindowClosedBehavior.respond(ModalWindow.java:832) 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.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) 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.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source)

    JIRA | 8 years ago | Martin Boulanger
    org.hibernate.NonUniqueResultException: query did not return a unique result: 4
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Steps to reproduce (run with onyx-1.0): 1) Import the attached database dump in MySql using the MySql administrator tool 2) Log in onyx using administrator/password 3) Receive a new participant 4) Refuse consent CRASH! Stack trace: 2009-02-20 15:11:47,171 - ERROR - apache.wicket.RequestCycle - query did not return a unique result: 4 org.hibernate.NonUniqueResultException: query did not return a unique result: 4 at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:820) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305) at org.obiba.core.service.impl.hibernate.PersistenceManagerHibernateImpl.matchOne(PersistenceManagerHibernateImpl.java:82) at sun.reflect.GeneratedMethodAccessor57.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy74.matchOne(Unknown Source) at org.obiba.onyx.quartz.core.service.impl.hibernate.QuestionnaireParticipantServiceHibernateImpl.isQuestionActive(QuestionnaireParticipantServiceHibernateImpl.java:85) at sun.reflect.GeneratedMethodAccessor98.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy83.isQuestionActive(Unknown Source) at org.obiba.onyx.quartz.engine.variable.impl.DefaultQuestionToVariableMappingStrategy.getVariableData(DefaultQuestionToVariableMappingStrategy.java:205) at org.obiba.onyx.quartz.engine.QuartzModule.getVariableData(QuartzModule.java:213) at org.obiba.onyx.engine.variable.VariableDirectory.getVariableData(VariableDirectory.java:162) at org.obiba.onyx.engine.VariableStageDependencyCondition.isDependencySatisfied(VariableStageDependencyCondition.java:74) at org.obiba.onyx.engine.MultipleStageDependencyCondition.isDependencySatisfied(MultipleStageDependencyCondition.java:85) at org.obiba.onyx.engine.state.AbstractStageState.areDependenciesCompleted(AbstractStageState.java:93) at org.obiba.onyx.engine.state.AbstractStageState.onTransition(AbstractStageState.java:78) at org.obiba.onyx.engine.state.StageExecutionContext.onTransition(StageExecutionContext.java:219) at org.obiba.onyx.engine.state.StageExecutionContext.castEvent(StageExecutionContext.java:116) at org.obiba.onyx.engine.state.AbstractStageState.castEvent(AbstractStageState.java:99) at org.obiba.onyx.engine.state.AbstractStageState.onTransition(AbstractStageState.java:87) at org.obiba.onyx.engine.state.StageExecutionContext.onTransition(StageExecutionContext.java:219) at org.obiba.onyx.engine.state.StageExecutionContext.castEvent(StageExecutionContext.java:116) at org.obiba.onyx.engine.state.AbstractStageState.castEvent(AbstractStageState.java:99) at org.obiba.onyx.marble.engine.state.MarbleInProgressState.complete(MarbleInProgressState.java:47) at org.obiba.onyx.engine.state.StageExecutionContext.complete(StageExecutionContext.java:173) at org.obiba.onyx.engine.ActionType$2.act(ActionType.java:36) at org.obiba.onyx.core.service.impl.DefaultActiveInterviewServiceImpl.doAction(DefaultActiveInterviewServiceImpl.java:143) at sun.reflect.GeneratedMethodAccessor232.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy130.doAction(Unknown Source) at sun.reflect.GeneratedMethodAccessor232.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) 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:149) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy78.doAction(Unknown Source) at sun.reflect.GeneratedMethodAccessor232.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416) at org.apache.wicket.proxy.$Proxy127.doAction(Unknown Source) at org.obiba.onyx.wicket.action.ActionWindow$2.onClose(ActionWindow.java:59) at org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow$WindowClosedBehavior.respond(ModalWindow.java:832) 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.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) 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.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.jstripe.tomcat.probe.Tomcat55AgentValve.invoke(Tomcat55AgentValve.java:20) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Unknown Source)

    JIRA | 8 years ago | Martin Boulanger
    org.hibernate.NonUniqueResultException: query did not return a unique result: 4
  6. 0

    Step to reproduce: 1) Start and complete all the stages of an interview 2) Start a second interview 3) Complete the consent All other stages are skipped, but they should not. 4) Export the data of both interviews. You will get the following crash: 2009-05-21 10:53:54,259 - ERROR - able.export.OnyxDataExport - Error exporting data to destination DCC:query did not ret urn a unique result: 2 org.hibernate.NonUniqueResultException: query did not return a unique result: 2 at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:820) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305) at org.obiba.core.service.impl.hibernate.PersistenceManagerHibernateImpl.matchOne(PersistenceManagerHibernateImp l.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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $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(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:70 0) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at org.obiba.onyx.engine.variable.export.OnyxDataExport$$EnhancerByCGLIB$$8e7132e5.exportCompletedInterviews(<ge nerated>) at org.obiba.onyx.engine.variable.export.OnyxDataExport$$FastClassByCGLIB$$c7571da3.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.apache.wicket.proxy.LazyInitProxyFactory$CGLibInterceptor.intercept(LazyInitProxyFactory.java:318) at WICKET_org.obiba.onyx.engine.variable.export.OnyxDataExport$$EnhancerByCGLIB$$bc0a71de.exportCompletedIntervi ews(<generated>) at org.obiba.onyx.webapp.participant.page.ParticipantSearchPage$ActionFragment$3$1.onClose(ParticipantSearchPage .java:510) at org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow$WindowClosedBehavior.respond(ModalWindow.java :832) 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.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) 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.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1139) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.j ava:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 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) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520) 2009-05-21 10:53:54,275 - ERROR - page.ParticipantSearchPage - Error on data export. org.hibernate.NonUniqueResultException: query did not return a unique result: 2 at org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:820) at org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305) at org.obiba.core.service.impl.hibernate.PersistenceManagerHibernateImpl.matchOne(PersistenceManagerHibernateImp l.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:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $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(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.springframework.aop.framework.Cglib2AopProxy$CglibMethodInvocation.invokeJoinpoint(Cglib2AopProxy.java:70 0) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.Cglib2AopProxy$DynamicAdvisedInterceptor.intercept(Cglib2AopProxy.java:635) at org.obiba.onyx.engine.variable.export.OnyxDataExport$$EnhancerByCGLIB$$8e7132e5.exportCompletedInterviews(<ge nerated>) at org.obiba.onyx.engine.variable.export.OnyxDataExport$$FastClassByCGLIB$$c7571da3.invoke(<generated>) at net.sf.cglib.proxy.MethodProxy.invoke(MethodProxy.java:149) at org.apache.wicket.proxy.LazyInitProxyFactory$CGLibInterceptor.intercept(LazyInitProxyFactory.java:318) at WICKET_org.obiba.onyx.engine.variable.export.OnyxDataExport$$EnhancerByCGLIB$$bc0a71de.exportCompletedIntervi ews(<generated>) at org.obiba.onyx.webapp.participant.page.ParticipantSearchPage$ActionFragment$3$1.onClose(ParticipantSearchPage .java:510) at org.apache.wicket.extensions.ajax.markup.html.modal.ModalWindow$WindowClosedBehavior.respond(ModalWindow.java :832) 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.request.AbstractRequestCycleProcessor.processEvents(AbstractRequestCycleProcessor.java:91) 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.apache.wicket.protocol.http.WicketFilter.doFilter(WicketFilter.java:200) at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1139) at org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.j ava:198) at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76) 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) at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:520)

    JIRA | 8 years ago | Martin Boulanger
    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: 4

      at org.hibernate.impl.AbstractQueryImpl.uniqueElement()
    2. Hibernate
      CriteriaImpl.uniqueResult
      1. org.hibernate.impl.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:820)
      2. org.hibernate.impl.CriteriaImpl.uniqueResult(CriteriaImpl.java:305)
      2 frames
    3. org.obiba.core
      PersistenceManagerHibernateImpl.matchOne
      1. org.obiba.core.service.impl.hibernate.PersistenceManagerHibernateImpl.matchOne(PersistenceManagerHibernateImpl.java:82)
      1 frame
    4. Java RT
      Method.invoke
      1. sun.reflect.GeneratedMethodAccessor21.invoke(Unknown Source)
      2. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      3. java.lang.reflect.Method.invoke(Method.java:597)
      3 frames
    5. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames
    6. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    7. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    8. Unknown
      $Proxy30.matchOne
      1. $Proxy30.matchOne(Unknown Source)
      1 frame
    9. org.obiba.onyx
      QuestionnaireParticipantServiceHibernateImpl.isQuestionActive
      1. org.obiba.onyx.quartz.core.service.impl.hibernate.QuestionnaireParticipantServiceHibernateImpl.isQuestionActive(QuestionnaireParticipantServiceHibernateImpl.java:85)
      1 frame
    10. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    11. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames
    12. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    13. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    14. Unknown
      $Proxy39.isQuestionActive
      1. $Proxy39.isQuestionActive(Unknown Source)
      1 frame
    15. org.obiba.onyx
      DefaultActiveInterviewServiceImpl.doAction
      1. org.obiba.onyx.quartz.engine.variable.impl.DefaultQuestionToVariableMappingStrategy.getVariableData(DefaultQuestionToVariableMappingStrategy.java:205)
      2. org.obiba.onyx.quartz.engine.QuartzModule.getVariableData(QuartzModule.java:213)
      3. org.obiba.onyx.engine.variable.VariableDirectory.getVariableData(VariableDirectory.java:162)
      4. org.obiba.onyx.engine.VariableStageDependencyCondition.isDependencySatisfied(VariableStageDependencyCondition.java:74)
      5. org.obiba.onyx.engine.MultipleStageDependencyCondition.isDependencySatisfied(MultipleStageDependencyCondition.java:85)
      6. org.obiba.onyx.engine.state.AbstractStageState.areDependenciesCompleted(AbstractStageState.java:93)
      7. org.obiba.onyx.engine.state.AbstractStageState.onTransition(AbstractStageState.java:78)
      8. org.obiba.onyx.engine.state.StageExecutionContext.onTransition(StageExecutionContext.java:219)
      9. org.obiba.onyx.engine.state.StageExecutionContext.castEvent(StageExecutionContext.java:116)
      10. org.obiba.onyx.engine.state.AbstractStageState.castEvent(AbstractStageState.java:99)
      11. org.obiba.onyx.engine.state.AbstractStageState.onTransition(AbstractStageState.java:87)
      12. org.obiba.onyx.engine.state.StageExecutionContext.onTransition(StageExecutionContext.java:219)
      13. org.obiba.onyx.engine.state.StageExecutionContext.castEvent(StageExecutionContext.java:116)
      14. org.obiba.onyx.engine.state.AbstractStageState.castEvent(AbstractStageState.java:99)
      15. org.obiba.onyx.marble.engine.state.MarbleInProgressState.complete(MarbleInProgressState.java:47)
      16. org.obiba.onyx.engine.state.StageExecutionContext.complete(StageExecutionContext.java:173)
      17. org.obiba.onyx.engine.ActionType$2.act(ActionType.java:36)
      18. org.obiba.onyx.core.service.impl.DefaultActiveInterviewServiceImpl.doAction(DefaultActiveInterviewServiceImpl.java:143)
      18 frames
    16. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    17. Spring AOP
      ReflectiveMethodInvocation.proceed
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      3 frames
    18. Spring Tx
      TransactionInterceptor.invoke
      1. org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:106)
      1 frame
    19. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      2. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      2 frames
    20. Unknown
      $Proxy45.doAction
      1. $Proxy45.doAction(Unknown Source)
      1 frame
    21. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    22. Spring AOP
      JdkDynamicAopProxy.invoke
      1. org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      2. org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      3. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      4. org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)
      5. org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)
      6. org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      7. org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      7 frames
    23. Unknown
      $Proxy34.doAction
      1. $Proxy34.doAction(Unknown Source)
      1 frame
    24. Java RT
      Method.invoke
      1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      4. java.lang.reflect.Method.invoke(Method.java:597)
      4 frames
    25. Wicket IoC common code
      $Proxy43.doAction
      1. org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:416)
      2. org.apache.wicket.proxy.$Proxy43.doAction(Unknown Source)
      2 frames
    26. org.obiba.onyx
      ActionWindow$2.onClose
      1. org.obiba.onyx.wicket.action.ActionWindow$2.onClose(ActionWindow.java:59)[...]
      1 frame