Unable to get data values on data entry screen

Hi Mahendra,

I think this is the significant error:

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

Could it be related to having multiple approval levels with the same org unit level? It could be a bug too - do you have an environment / parameters for which I can test?

regards,

Lars

···

On Mon, Dec 15, 2014 at 6:33 AM, Mahendra Kariya mahendra.kariya@thoughtworks.com wrote:

Hi,

We are not seeing any data values on the data entry screen after the data is approved. We are on rev 17698 of trunk.

Below is the database snapshot and stack trace of exception.

Hibernate: select optioncomb0_.categorycomboid as category2_4_1_, optioncomb0_.categoryoptioncomboid as category1_6_1_, dataelemen1_.categoryoptioncomboid as category1_11_0_, dataelemen1_.uid as uid2_11_0_, dataelemen1_.code as code3_11_0_, dataelemen1_.created as created4_11_0_, dataelemen1_.lastUpdated as lastUpda5_11_0_, dataelemen1_1_.categorycomboid as category2_6_0_ from categorycombos_optioncombos optioncomb0_ inner join categoryoptioncombo dataelemen1_ on optioncomb0_.categoryoptioncomboid=dataelemen1_.categoryoptioncomboid left outer join categorycombos_optioncombos dataelemen1_1_ on dataelemen1_.categoryoptioncomboid=dataelemen1_1_.categoryoptioncomboid where optioncomb0_.categorycomboid=?

Hibernate: select categoryop0_.categoryoptioncomboid as category2_11_3_, categoryop0_.categoryoptionid as category1_12_3_, dataelemen1_.categoryoptionid as category1_52_0_, dataelemen1_.uid as uid2_52_0_, dataelemen1_.code as code3_52_0_, dataelemen1_.created as created4_52_0_, dataelemen1_.lastUpdated as lastUpda5_52_0_, dataelemen1_.name as name6_52_0_, dataelemen1_.shortname as shortnam7_52_0_, dataelemen1_.startDate as startDat8_52_0_, dataelemen1_.endDate as endDate9_52_0_, dataelemen1_.userid as userid10_52_0_, dataelemen1_.publicAccess as publicA11_52_0_, user2_.userinfoid as userinfo1_241_1_, user2_.uid as uid2_241_1_, user2_.code as code3_241_1_, user2_.lastUpdated as lastUpda4_241_1_, user2_.created as created5_241_1_, user2_.surname as surname6_241_1_, user2_.firstName as firstNam7_241_1_, user2_.email as email8_241_1_, user2_.phoneNumber as phoneNum9_241_1_, user2_.jobTitle as jobTitl10_241_1_, user2_.introduction as introdu11_241_1_, user2_.gender as gender12_241_1_, user2_.birthday as birthda13_241_1_, user2_.nationality as nationa14_241_1_, user2_.employer as employe15_241_1_, user2_.education as educati16_241_1_, user2_.interests as interes17_241_1_, user2_.languages as languag18_241_1_, user2_.lastCheckedInterpretations as lastChe19_241_1_, usercreden3_.userid as userid1_249_2_, usercreden3_.username as username2_249_2_, usercreden3_.openid as openid3_249_2_, usercreden3_.password as password4_249_2_, usercreden3_.passwordLastUpdated as password5_249_2_, usercreden3_.lastLogin as lastLogi6_249_2_, usercreden3_.restoreToken as restoreT7_249_2_, usercreden3_.restoreCode as restoreC8_249_2_, usercreden3_.restoreExpiry as restoreE9_249_2_, usercreden3_.selfRegistered as selfReg10_249_2_, usercreden3_.disabled as disable11_249_2_, usercreden3_.created as created12_249_2_ from categoryoptioncombos_categoryoptions categoryop0_ inner join dataelementcategoryoption dataelemen1_ on categoryop0_.categoryoptionid=dataelemen1_.categoryoptionid left outer join userinfo user2_ on dataelemen1_.userid=user2_.userinfoid left outer join users usercreden3_ on user2_.userinfoid=usercreden3_.userid where categoryop0_.categoryoptioncomboid=?

Hibernate: select categoryop0_.categoryoptioncomboid as category2_11_3_, categoryop0_.categoryoptionid as category1_12_3_, dataelemen1_.categoryoptionid as category1_52_0_, dataelemen1_.uid as uid2_52_0_, dataelemen1_.code as code3_52_0_, dataelemen1_.created as created4_52_0_, dataelemen1_.lastUpdated as lastUpda5_52_0_, dataelemen1_.name as name6_52_0_, dataelemen1_.shortname as shortnam7_52_0_, dataelemen1_.startDate as startDat8_52_0_, dataelemen1_.endDate as endDate9_52_0_, dataelemen1_.userid as userid10_52_0_, dataelemen1_.publicAccess as publicA11_52_0_, user2_.userinfoid as userinfo1_241_1_, user2_.uid as uid2_241_1_, user2_.code as code3_241_1_, user2_.lastUpdated as lastUpda4_241_1_, user2_.created as created5_241_1_, user2_.surname as surname6_241_1_, user2_.firstName as firstNam7_241_1_, user2_.email as email8_241_1_, user2_.phoneNumber as phoneNum9_241_1_, user2_.jobTitle as jobTitl10_241_1_, user2_.introduction as introdu11_241_1_, user2_.gender as gender12_241_1_, user2_.birthday as birthda13_241_1_, user2_.nationality as nationa14_241_1_, user2_.employer as employe15_241_1_, user2_.education as educati16_241_1_, user2_.interests as interes17_241_1_, user2_.languages as languag18_241_1_, user2_.lastCheckedInterpretations as lastChe19_241_1_, usercreden3_.userid as userid1_249_2_, usercreden3_.username as username2_249_2_, usercreden3_.openid as openid3_249_2_, usercreden3_.password as password4_249_2_, usercreden3_.passwordLastUpdated as password5_249_2_, usercreden3_.lastLogin as lastLogi6_249_2_, usercreden3_.restoreToken as restoreT7_249_2_, usercreden3_.restoreCode as restoreC8_249_2_, usercreden3_.restoreExpiry as restoreE9_249_2_, usercreden3_.selfRegistered as selfReg10_249_2_, usercreden3_.disabled as disable11_249_2_, usercreden3_.created as created12_249_2_ from categoryoptioncombos_categoryoptions categoryop0_ inner join dataelementcategoryoption dataelemen1_ on categoryop0_.categoryoptionid=dataelemen1_.categoryoptionid left outer join userinfo user2_ on dataelemen1_.userid=user2_.userinfoid left outer join users usercreden3_ on user2_.userinfoid=usercreden3_.userid where categoryop0_.categoryoptioncomboid=?

Hibernate: select dataelemen0_.datasetid as dataseti2_65_3_, dataelemen0_.dataelementid as dataelem1_68_3_, dataelemen1_.dataelementid as dataelem1_48_0_, dataelemen1_.uid as uid2_48_0_, dataelemen1_.code as code3_48_0_, dataelemen1_.created as created4_48_0_, dataelemen1_.lastUpdated as lastUpda5_48_0_, dataelemen1_.name as name6_48_0_, dataelemen1_.shortname as shortnam7_48_0_, dataelemen1_.description as descript8_48_0_, dataelemen1_.formName as formName9_48_0_, dataelemen1_.valuetype as valuety10_48_0_, dataelemen1_.numbertype as numbert11_48_0_, dataelemen1_.textType as textTyp12_48_0_, dataelemen1_.domainType as domainT13_48_0_, dataelemen1_.aggregationtype as aggrega14_48_0_, dataelemen1_.categorycomboid as categor15_48_0_, dataelemen1_.url as url16_48_0_, dataelemen1_.zeroIsSignificant as zeroIsS17_48_0_, dataelemen1_.optionsetid as options18_48_0_, dataelemen1_.commentoptionsetid as comment19_48_0_, dataelemen1_.legendsetid as legends20_48_0_, dataelemen1_.userid as userid21_48_0_, dataelemen1_.publicAccess as publicA22_48_0_, user2_.userinfoid as userinfo1_241_1_, user2_.uid as uid2_241_1_, user2_.code as code3_241_1_, user2_.lastUpdated as lastUpda4_241_1_, user2_.created as created5_241_1_, user2_.surname as surname6_241_1_, user2_.firstName as firstNam7_241_1_, user2_.email as email8_241_1_, user2_.phoneNumber as phoneNum9_241_1_, user2_.jobTitle as jobTitl10_241_1_, user2_.introduction as introdu11_241_1_, user2_.gender as gender12_241_1_, user2_.birthday as birthda13_241_1_, user2_.nationality as nationa14_241_1_, user2_.employer as employe15_241_1_, user2_.education as educati16_241_1_, user2_.interests as interes17_241_1_, user2_.languages as languag18_241_1_, user2_.lastCheckedInterpretations as lastChe19_241_1_, usercreden3_.userid as userid1_249_2_, usercreden3_.username as username2_249_2_, usercreden3_.openid as openid3_249_2_, usercreden3_.password as password4_249_2_, usercreden3_.passwordLastUpdated as password5_249_2_, usercreden3_.lastLogin as lastLogi6_249_2_, usercreden3_.restoreToken as restoreT7_249_2_, usercreden3_.restoreCode as restoreC8_249_2_, usercreden3_.restoreExpiry as restoreE9_249_2_, usercreden3_.selfRegistered as selfReg10_249_2_, usercreden3_.disabled as disable11_249_2_, usercreden3_.created as created12_249_2_ from datasetmembers dataelemen0_ inner join dataelement dataelemen1_ on dataelemen0_.dataelementid=dataelemen1_.dataelementid left outer join userinfo user2_ on dataelemen1_.userid=user2_.userinfoid left outer join users usercreden3_ on user2_.userinfoid=usercreden3_.userid where dataelemen0_.datasetid=?

Hibernate: select this_.minmaxdataelementid as minmaxda1_144_0_, this_.sourceid as sourceid2_144_0_, this_.dataelementid as dataelem3_144_0_, this_.categoryoptioncomboid as category4_144_0_, this_.minimumvalue as minimumv5_144_0_, this_.maximumvalue as maximumv6_144_0_, this_.generated as generate7_144_0_ from minmaxdataelement this_ where this_.sourceid=? and this_.dataelementid in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

Hibernate: select this_.periodtypeid as periodty1_162_0_ from periodtype this_ where this_.name=‘Weekly’

Hibernate: select this_.periodid as periodid1_161_0_, this_.periodtypeid as periodty2_161_0_, this_.startdate as startdat3_161_0_, this_.enddate as enddate4_161_0_ from period this_ where this_.startdate=? and this_.enddate=? and this_.periodtypeid=?

Hibernate: select this_.dataelementid as dataelem1_72_0_, this_.periodid as periodid2_72_0_, this_.sourceid as sourceid3_72_0_, this_.categoryoptioncomboid as category4_72_0_, this_.attributeoptioncomboid as attribut5_72_0_, this_.value as value6_72_0_, this_.storedby as storedby7_72_0_, this_.created as created8_72_0_, this_.lastupdated as lastupda9_72_0_, this_.comment as comment10_72_0_, this_.followup as followu11_72_0_ from datavalue this_ where this_.sourceid=? and this_.periodid=? and this_.dataelementid in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and this_.attributeoptioncomboid=?

Hibernate: select this_.datasetid as dataseti1_34_0_, this_.periodid as periodid2_34_0_, this_.sourceid as sourceid3_34_0_, this_.attributeoptioncomboid as attribut4_34_0_, this_.date as date5_34_0_, this_.storedby as storedby6_34_0_ from completedatasetregistration this_ where this_.datasetid=? and this_.periodid=? and this_.sourceid=? and this_.attributeoptioncomboid=?

Hibernate: select count(*) as y0_ from lockexception this_ where this_.periodid=? and this_.organisationunitid=? and this_.datasetid=?

Hibernate: select this_.dataapprovallevelid as dataappr1_46_2_, this_.uid as uid2_46_2_, this_.code as code3_46_2_, this_.created as created4_46_2_, this_.lastUpdated as lastUpda5_46_2_, this_.name as name6_46_2_, this_.level as level7_46_2_, this_.orgunitlevel as orgunitl8_46_2_, this_.categoryoptiongroupsetid as category9_46_2_, this_.userid as userid10_46_2_, this_.publicAccess as publicA11_46_2_, user2_.userinfoid as userinfo1_241_0_, user2_.uid as uid2_241_0_, user2_.code as code3_241_0_, user2_.lastUpdated as lastUpda4_241_0_, user2_.created as created5_241_0_, user2_.surname as surname6_241_0_, user2_.firstName as firstNam7_241_0_, user2_.email as email8_241_0_, user2_.phoneNumber as phoneNum9_241_0_, user2_.jobTitle as jobTitl10_241_0_, user2_.introduction as introdu11_241_0_, user2_.gender as gender12_241_0_, user2_.birthday as birthda13_241_0_, user2_.nationality as nationa14_241_0_, user2_.employer as employe15_241_0_, user2_.education as educati16_241_0_, user2_.interests as interes17_241_0_, user2_.languages as languag18_241_0_, user2_.lastCheckedInterpretations as lastChe19_241_0_, usercreden3_.userid as userid1_249_1_, usercreden3_.username as username2_249_1_, usercreden3_.openid as openid3_249_1_, usercreden3_.password as password4_249_1_, usercreden3_.passwordLastUpdated as password5_249_1_, usercreden3_.lastLogin as lastLogi6_249_1_, usercreden3_.restoreToken as restoreT7_249_1_, usercreden3_.restoreCode as restoreC8_249_1_, usercreden3_.restoreExpiry as restoreE9_249_1_, usercreden3_.selfRegistered as selfReg10_249_1_, usercreden3_.disabled as disable11_249_1_, usercreden3_.created as created12_249_1_ from dataapprovallevel this_ left outer join userinfo user2_ on this_.userid=user2_.userinfoid left outer join users usercreden3_ on user2_.userinfoid=usercreden3_.userid order by this_.level asc

Hibernate: select this_.orgunitlevelid as orgunitl1_158_0_, this_.uid as uid2_158_0_, this_.code as code3_158_0_, this_.created as created4_158_0_, this_.lastUpdated as lastUpda5_158_0_, this_.name as name6_158_0_, this_.level as level7_158_0_ from orgunitlevel this_ where this_.level=?

Hibernate: select this_.dataapprovalid as dataappr1_45_2_, this_.dataapprovallevelid as dataappr2_45_2_, this_.datasetid as dataseti3_45_2_, this_.periodid as periodid4_45_2_, this_.organisationunitid as organisa5_45_2_, this_.attributeoptioncomboid as attribut6_45_2_, this_.accepted as accepted7_45_2_, this_.created as created8_45_2_, this_.creator as creator9_45_2_, user2_.userinfoid as userinfo1_241_0_, user2_.uid as uid2_241_0_, user2_.code as code3_241_0_, user2_.lastUpdated as lastUpda4_241_0_, user2_.created as created5_241_0_, user2_.surname as surname6_241_0_, user2_.firstName as firstNam7_241_0_, user2_.email as email8_241_0_, user2_.phoneNumber as phoneNum9_241_0_, user2_.jobTitle as jobTitl10_241_0_, user2_.introduction as introdu11_241_0_, user2_.gender as gender12_241_0_, user2_.birthday as birthda13_241_0_, user2_.nationality as nationa14_241_0_, user2_.employer as employe15_241_0_, user2_.education as educati16_241_0_, user2_.interests as interes17_241_0_, user2_.languages as languag18_241_0_, user2_.lastCheckedInterpretations as lastChe19_241_0_, usercreden3_.userid as userid1_249_1_, usercreden3_.username as username2_249_1_, usercreden3_.openid as openid3_249_1_, usercreden3_.password as password4_249_1_, usercreden3_.passwordLastUpdated as password5_249_1_, usercreden3_.lastLogin as lastLogi6_249_1_, usercreden3_.restoreToken as restoreT7_249_1_, usercreden3_.restoreCode as restoreC8_249_1_, usercreden3_.restoreExpiry as restoreE9_249_1_, usercreden3_.selfRegistered as selfReg10_249_1_, usercreden3_.disabled as disable11_249_1_, usercreden3_.created as created12_249_1_ from dataapproval this_ inner join userinfo user2_ on this_.creator=user2_.userinfoid left outer join users usercreden3_ on user2_.userinfoid=usercreden3_.userid where this_.dataapprovallevelid=? and this_.datasetid=? and this_.periodid=? and this_.organisationunitid=? and this_.attributeoptioncomboid=?

  • ERROR 2014-12-15 10:56:29,971 Error while executing action (ExceptionInterceptor.java [qtp770899091-73])

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

at org.hibernate.internal.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:914)

at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:396)

at org.hisp.dhis.dataapproval.hibernate.HibernateDataApprovalStore.getDataApproval(HibernateDataApprovalStore.java:186)

at org.hisp.dhis.dataapproval.DefaultDataApprovalService.getDataApprovalStatus(DefaultDataApprovalService.java:338)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)

at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:267)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)

at com.sun.proxy.$Proxy75.getDataApprovalStatus(Unknown Source)

at org.hisp.dhis.dataset.DefaultDataSetService.isLocked(DefaultDataSetService.java:506)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)

at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:267)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)

at com.sun.proxy.$Proxy73.isLocked(Unknown Source)

at org.hisp.dhis.de.action.GetDataValuesForDataSetAction.execute(GetDataValuesForDataSetAction.java:274)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450)

at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252)

at org.hisp.dhis.webportal.interceptor.XWorkPortalUserInterceptor.intercept(XWorkPortalUserInterceptor.java:91)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.webportal.interceptor.XWorkPortalModuleInterceptor.intercept(XWorkPortalModuleInterceptor.java:92)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.webportal.interceptor.XWorkPortalMenuInterceptor.intercept(XWorkPortalMenuInterceptor.java:100)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.webportal.interceptor.XWorkPortalParamsInterceptor.intercept(XWorkPortalParamsInterceptor.java:150)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.interceptor.ContextInterceptor.intercept(ContextInterceptor.java:83)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.interceptor.UserSettingInterceptor.intercept(UserSettingInterceptor.java:84)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.security.intercept.LoginInterceptor.intercept(LoginInterceptor.java:85)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.security.intercept.XWorkSecurityInterceptor.intercept(XWorkSecurityInterceptor.java:116)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.interceptor.SystemSettingInterceptor.intercept(SystemSettingInterceptor.java:135)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:254)

at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.interceptor.ExceptionInterceptor.intercept(ExceptionInterceptor.java:113)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)

at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:562)

at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)

at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:64)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:115)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)

at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)

at org.eclipse.jetty.server.Server.handle(Server.java:485)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:290)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)

at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:606)

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:535)

at java.lang.Thread.run(Thread.java:724)

Great, thanks.

Lars

···

On Thu, Dec 25, 2014 at 5:27 PM, Mahendra Kariya mahendra.kariya@thoughtworks.com wrote:

Hi Lars,

There was only one approval level in the database at org unit level 6.

I don’t have the environment right now. This appeared in my local box and I have recreated the database multiple times since I sent this email. I will try to create an environment where this scenario could be reproduced and send it to you early next week.

On Thu, Dec 25, 2014 at 9:06 PM, Lars Helge Øverland larshelge@gmail.com wrote:

Hi Mahendra,

I think this is the significant error:

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

Could it be related to having multiple approval levels with the same org unit level? It could be a bug too - do you have an environment / parameters for which I can test?

regards,

Lars

On Mon, Dec 15, 2014 at 6:33 AM, Mahendra Kariya mahendra.kariya@thoughtworks.com wrote:

Hi,

We are not seeing any data values on the data entry screen after the data is approved. We are on rev 17698 of trunk.

Below is the database snapshot and stack trace of exception.

Hibernate: select optioncomb0_.categorycomboid as category2_4_1_, optioncomb0_.categoryoptioncomboid as category1_6_1_, dataelemen1_.categoryoptioncomboid as category1_11_0_, dataelemen1_.uid as uid2_11_0_, dataelemen1_.code as code3_11_0_, dataelemen1_.created as created4_11_0_, dataelemen1_.lastUpdated as lastUpda5_11_0_, dataelemen1_1_.categorycomboid as category2_6_0_ from categorycombos_optioncombos optioncomb0_ inner join categoryoptioncombo dataelemen1_ on optioncomb0_.categoryoptioncomboid=dataelemen1_.categoryoptioncomboid left outer join categorycombos_optioncombos dataelemen1_1_ on dataelemen1_.categoryoptioncomboid=dataelemen1_1_.categoryoptioncomboid where optioncomb0_.categorycomboid=?

Hibernate: select categoryop0_.categoryoptioncomboid as category2_11_3_, categoryop0_.categoryoptionid as category1_12_3_, dataelemen1_.categoryoptionid as category1_52_0_, dataelemen1_.uid as uid2_52_0_, dataelemen1_.code as code3_52_0_, dataelemen1_.created as created4_52_0_, dataelemen1_.lastUpdated as lastUpda5_52_0_, dataelemen1_.name as name6_52_0_, dataelemen1_.shortname as shortnam7_52_0_, dataelemen1_.startDate as startDat8_52_0_, dataelemen1_.endDate as endDate9_52_0_, dataelemen1_.userid as userid10_52_0_, dataelemen1_.publicAccess as publicA11_52_0_, user2_.userinfoid as userinfo1_241_1_, user2_.uid as uid2_241_1_, user2_.code as code3_241_1_, user2_.lastUpdated as lastUpda4_241_1_, user2_.created as created5_241_1_, user2_.surname as surname6_241_1_, user2_.firstName as firstNam7_241_1_, user2_.email as email8_241_1_, user2_.phoneNumber as phoneNum9_241_1_, user2_.jobTitle as jobTitl10_241_1_, user2_.introduction as introdu11_241_1_, user2_.gender as gender12_241_1_, user2_.birthday as birthda13_241_1_, user2_.nationality as nationa14_241_1_, user2_.employer as employe15_241_1_, user2_.education as educati16_241_1_, user2_.interests as interes17_241_1_, user2_.languages as languag18_241_1_, user2_.lastCheckedInterpretations as lastChe19_241_1_, usercreden3_.userid as userid1_249_2_, usercreden3_.username as username2_249_2_, usercreden3_.openid as openid3_249_2_, usercreden3_.password as password4_249_2_, usercreden3_.passwordLastUpdated as password5_249_2_, usercreden3_.lastLogin as lastLogi6_249_2_, usercreden3_.restoreToken as restoreT7_249_2_, usercreden3_.restoreCode as restoreC8_249_2_, usercreden3_.restoreExpiry as restoreE9_249_2_, usercreden3_.selfRegistered as selfReg10_249_2_, usercreden3_.disabled as disable11_249_2_, usercreden3_.created as created12_249_2_ from categoryoptioncombos_categoryoptions categoryop0_ inner join dataelementcategoryoption dataelemen1_ on categoryop0_.categoryoptionid=dataelemen1_.categoryoptionid left outer join userinfo user2_ on dataelemen1_.userid=user2_.userinfoid left outer join users usercreden3_ on user2_.userinfoid=usercreden3_.userid where categoryop0_.categoryoptioncomboid=?

Hibernate: select categoryop0_.categoryoptioncomboid as category2_11_3_, categoryop0_.categoryoptionid as category1_12_3_, dataelemen1_.categoryoptionid as category1_52_0_, dataelemen1_.uid as uid2_52_0_, dataelemen1_.code as code3_52_0_, dataelemen1_.created as created4_52_0_, dataelemen1_.lastUpdated as lastUpda5_52_0_, dataelemen1_.name as name6_52_0_, dataelemen1_.shortname as shortnam7_52_0_, dataelemen1_.startDate as startDat8_52_0_, dataelemen1_.endDate as endDate9_52_0_, dataelemen1_.userid as userid10_52_0_, dataelemen1_.publicAccess as publicA11_52_0_, user2_.userinfoid as userinfo1_241_1_, user2_.uid as uid2_241_1_, user2_.code as code3_241_1_, user2_.lastUpdated as lastUpda4_241_1_, user2_.created as created5_241_1_, user2_.surname as surname6_241_1_, user2_.firstName as firstNam7_241_1_, user2_.email as email8_241_1_, user2_.phoneNumber as phoneNum9_241_1_, user2_.jobTitle as jobTitl10_241_1_, user2_.introduction as introdu11_241_1_, user2_.gender as gender12_241_1_, user2_.birthday as birthda13_241_1_, user2_.nationality as nationa14_241_1_, user2_.employer as employe15_241_1_, user2_.education as educati16_241_1_, user2_.interests as interes17_241_1_, user2_.languages as languag18_241_1_, user2_.lastCheckedInterpretations as lastChe19_241_1_, usercreden3_.userid as userid1_249_2_, usercreden3_.username as username2_249_2_, usercreden3_.openid as openid3_249_2_, usercreden3_.password as password4_249_2_, usercreden3_.passwordLastUpdated as password5_249_2_, usercreden3_.lastLogin as lastLogi6_249_2_, usercreden3_.restoreToken as restoreT7_249_2_, usercreden3_.restoreCode as restoreC8_249_2_, usercreden3_.restoreExpiry as restoreE9_249_2_, usercreden3_.selfRegistered as selfReg10_249_2_, usercreden3_.disabled as disable11_249_2_, usercreden3_.created as created12_249_2_ from categoryoptioncombos_categoryoptions categoryop0_ inner join dataelementcategoryoption dataelemen1_ on categoryop0_.categoryoptionid=dataelemen1_.categoryoptionid left outer join userinfo user2_ on dataelemen1_.userid=user2_.userinfoid left outer join users usercreden3_ on user2_.userinfoid=usercreden3_.userid where categoryop0_.categoryoptioncomboid=?

Hibernate: select dataelemen0_.datasetid as dataseti2_65_3_, dataelemen0_.dataelementid as dataelem1_68_3_, dataelemen1_.dataelementid as dataelem1_48_0_, dataelemen1_.uid as uid2_48_0_, dataelemen1_.code as code3_48_0_, dataelemen1_.created as created4_48_0_, dataelemen1_.lastUpdated as lastUpda5_48_0_, dataelemen1_.name as name6_48_0_, dataelemen1_.shortname as shortnam7_48_0_, dataelemen1_.description as descript8_48_0_, dataelemen1_.formName as formName9_48_0_, dataelemen1_.valuetype as valuety10_48_0_, dataelemen1_.numbertype as numbert11_48_0_, dataelemen1_.textType as textTyp12_48_0_, dataelemen1_.domainType as domainT13_48_0_, dataelemen1_.aggregationtype as aggrega14_48_0_, dataelemen1_.categorycomboid as categor15_48_0_, dataelemen1_.url as url16_48_0_, dataelemen1_.zeroIsSignificant as zeroIsS17_48_0_, dataelemen1_.optionsetid as options18_48_0_, dataelemen1_.commentoptionsetid as comment19_48_0_, dataelemen1_.legendsetid as legends20_48_0_, dataelemen1_.userid as userid21_48_0_, dataelemen1_.publicAccess as publicA22_48_0_, user2_.userinfoid as userinfo1_241_1_, user2_.uid as uid2_241_1_, user2_.code as code3_241_1_, user2_.lastUpdated as lastUpda4_241_1_, user2_.created as created5_241_1_, user2_.surname as surname6_241_1_, user2_.firstName as firstNam7_241_1_, user2_.email as email8_241_1_, user2_.phoneNumber as phoneNum9_241_1_, user2_.jobTitle as jobTitl10_241_1_, user2_.introduction as introdu11_241_1_, user2_.gender as gender12_241_1_, user2_.birthday as birthda13_241_1_, user2_.nationality as nationa14_241_1_, user2_.employer as employe15_241_1_, user2_.education as educati16_241_1_, user2_.interests as interes17_241_1_, user2_.languages as languag18_241_1_, user2_.lastCheckedInterpretations as lastChe19_241_1_, usercreden3_.userid as userid1_249_2_, usercreden3_.username as username2_249_2_, usercreden3_.openid as openid3_249_2_, usercreden3_.password as password4_249_2_, usercreden3_.passwordLastUpdated as password5_249_2_, usercreden3_.lastLogin as lastLogi6_249_2_, usercreden3_.restoreToken as restoreT7_249_2_, usercreden3_.restoreCode as restoreC8_249_2_, usercreden3_.restoreExpiry as restoreE9_249_2_, usercreden3_.selfRegistered as selfReg10_249_2_, usercreden3_.disabled as disable11_249_2_, usercreden3_.created as created12_249_2_ from datasetmembers dataelemen0_ inner join dataelement dataelemen1_ on dataelemen0_.dataelementid=dataelemen1_.dataelementid left outer join userinfo user2_ on dataelemen1_.userid=user2_.userinfoid left outer join users usercreden3_ on user2_.userinfoid=usercreden3_.userid where dataelemen0_.datasetid=?

Hibernate: select this_.minmaxdataelementid as minmaxda1_144_0_, this_.sourceid as sourceid2_144_0_, this_.dataelementid as dataelem3_144_0_, this_.categoryoptioncomboid as category4_144_0_, this_.minimumvalue as minimumv5_144_0_, this_.maximumvalue as maximumv6_144_0_, this_.generated as generate7_144_0_ from minmaxdataelement this_ where this_.sourceid=? and this_.dataelementid in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

Hibernate: select this_.periodtypeid as periodty1_162_0_ from periodtype this_ where this_.name=‘Weekly’

Hibernate: select this_.periodid as periodid1_161_0_, this_.periodtypeid as periodty2_161_0_, this_.startdate as startdat3_161_0_, this_.enddate as enddate4_161_0_ from period this_ where this_.startdate=? and this_.enddate=? and this_.periodtypeid=?

Hibernate: select this_.dataelementid as dataelem1_72_0_, this_.periodid as periodid2_72_0_, this_.sourceid as sourceid3_72_0_, this_.categoryoptioncomboid as category4_72_0_, this_.attributeoptioncomboid as attribut5_72_0_, this_.value as value6_72_0_, this_.storedby as storedby7_72_0_, this_.created as created8_72_0_, this_.lastupdated as lastupda9_72_0_, this_.comment as comment10_72_0_, this_.followup as followu11_72_0_ from datavalue this_ where this_.sourceid=? and this_.periodid=? and this_.dataelementid in (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) and this_.attributeoptioncomboid=?

Hibernate: select this_.datasetid as dataseti1_34_0_, this_.periodid as periodid2_34_0_, this_.sourceid as sourceid3_34_0_, this_.attributeoptioncomboid as attribut4_34_0_, this_.date as date5_34_0_, this_.storedby as storedby6_34_0_ from completedatasetregistration this_ where this_.datasetid=? and this_.periodid=? and this_.sourceid=? and this_.attributeoptioncomboid=?

Hibernate: select count(*) as y0_ from lockexception this_ where this_.periodid=? and this_.organisationunitid=? and this_.datasetid=?

Hibernate: select this_.dataapprovallevelid as dataappr1_46_2_, this_.uid as uid2_46_2_, this_.code as code3_46_2_, this_.created as created4_46_2_, this_.lastUpdated as lastUpda5_46_2_, this_.name as name6_46_2_, this_.level as level7_46_2_, this_.orgunitlevel as orgunitl8_46_2_, this_.categoryoptiongroupsetid as category9_46_2_, this_.userid as userid10_46_2_, this_.publicAccess as publicA11_46_2_, user2_.userinfoid as userinfo1_241_0_, user2_.uid as uid2_241_0_, user2_.code as code3_241_0_, user2_.lastUpdated as lastUpda4_241_0_, user2_.created as created5_241_0_, user2_.surname as surname6_241_0_, user2_.firstName as firstNam7_241_0_, user2_.email as email8_241_0_, user2_.phoneNumber as phoneNum9_241_0_, user2_.jobTitle as jobTitl10_241_0_, user2_.introduction as introdu11_241_0_, user2_.gender as gender12_241_0_, user2_.birthday as birthda13_241_0_, user2_.nationality as nationa14_241_0_, user2_.employer as employe15_241_0_, user2_.education as educati16_241_0_, user2_.interests as interes17_241_0_, user2_.languages as languag18_241_0_, user2_.lastCheckedInterpretations as lastChe19_241_0_, usercreden3_.userid as userid1_249_1_, usercreden3_.username as username2_249_1_, usercreden3_.openid as openid3_249_1_, usercreden3_.password as password4_249_1_, usercreden3_.passwordLastUpdated as password5_249_1_, usercreden3_.lastLogin as lastLogi6_249_1_, usercreden3_.restoreToken as restoreT7_249_1_, usercreden3_.restoreCode as restoreC8_249_1_, usercreden3_.restoreExpiry as restoreE9_249_1_, usercreden3_.selfRegistered as selfReg10_249_1_, usercreden3_.disabled as disable11_249_1_, usercreden3_.created as created12_249_1_ from dataapprovallevel this_ left outer join userinfo user2_ on this_.userid=user2_.userinfoid left outer join users usercreden3_ on user2_.userinfoid=usercreden3_.userid order by this_.level asc

Hibernate: select this_.orgunitlevelid as orgunitl1_158_0_, this_.uid as uid2_158_0_, this_.code as code3_158_0_, this_.created as created4_158_0_, this_.lastUpdated as lastUpda5_158_0_, this_.name as name6_158_0_, this_.level as level7_158_0_ from orgunitlevel this_ where this_.level=?

Hibernate: select this_.dataapprovalid as dataappr1_45_2_, this_.dataapprovallevelid as dataappr2_45_2_, this_.datasetid as dataseti3_45_2_, this_.periodid as periodid4_45_2_, this_.organisationunitid as organisa5_45_2_, this_.attributeoptioncomboid as attribut6_45_2_, this_.accepted as accepted7_45_2_, this_.created as created8_45_2_, this_.creator as creator9_45_2_, user2_.userinfoid as userinfo1_241_0_, user2_.uid as uid2_241_0_, user2_.code as code3_241_0_, user2_.lastUpdated as lastUpda4_241_0_, user2_.created as created5_241_0_, user2_.surname as surname6_241_0_, user2_.firstName as firstNam7_241_0_, user2_.email as email8_241_0_, user2_.phoneNumber as phoneNum9_241_0_, user2_.jobTitle as jobTitl10_241_0_, user2_.introduction as introdu11_241_0_, user2_.gender as gender12_241_0_, user2_.birthday as birthda13_241_0_, user2_.nationality as nationa14_241_0_, user2_.employer as employe15_241_0_, user2_.education as educati16_241_0_, user2_.interests as interes17_241_0_, user2_.languages as languag18_241_0_, user2_.lastCheckedInterpretations as lastChe19_241_0_, usercreden3_.userid as userid1_249_1_, usercreden3_.username as username2_249_1_, usercreden3_.openid as openid3_249_1_, usercreden3_.password as password4_249_1_, usercreden3_.passwordLastUpdated as password5_249_1_, usercreden3_.lastLogin as lastLogi6_249_1_, usercreden3_.restoreToken as restoreT7_249_1_, usercreden3_.restoreCode as restoreC8_249_1_, usercreden3_.restoreExpiry as restoreE9_249_1_, usercreden3_.selfRegistered as selfReg10_249_1_, usercreden3_.disabled as disable11_249_1_, usercreden3_.created as created12_249_1_ from dataapproval this_ inner join userinfo user2_ on this_.creator=user2_.userinfoid left outer join users usercreden3_ on user2_.userinfoid=usercreden3_.userid where this_.dataapprovallevelid=? and this_.datasetid=? and this_.periodid=? and this_.organisationunitid=? and this_.attributeoptioncomboid=?

  • ERROR 2014-12-15 10:56:29,971 Error while executing action (ExceptionInterceptor.java [qtp770899091-73])

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

at org.hibernate.internal.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:914)

at org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:396)

at org.hisp.dhis.dataapproval.hibernate.HibernateDataApprovalStore.getDataApproval(HibernateDataApprovalStore.java:186)

at org.hisp.dhis.dataapproval.DefaultDataApprovalService.getDataApprovalStatus(DefaultDataApprovalService.java:338)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)

at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:267)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)

at com.sun.proxy.$Proxy75.getDataApprovalStatus(Unknown Source)

at org.hisp.dhis.dataset.DefaultDataSetService.isLocked(DefaultDataSetService.java:506)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)

at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:267)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:92)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)

at com.sun.proxy.$Proxy73.isLocked(Unknown Source)

at org.hisp.dhis.de.action.GetDataValuesForDataSetAction.execute(GetDataValuesForDataSetAction.java:274)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at com.opensymphony.xwork2.DefaultActionInvocation.invokeAction(DefaultActionInvocation.java:450)

at com.opensymphony.xwork2.DefaultActionInvocation.invokeActionOnly(DefaultActionInvocation.java:289)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:252)

at org.hisp.dhis.webportal.interceptor.XWorkPortalUserInterceptor.intercept(XWorkPortalUserInterceptor.java:91)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.webportal.interceptor.XWorkPortalModuleInterceptor.intercept(XWorkPortalModuleInterceptor.java:92)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.webportal.interceptor.XWorkPortalMenuInterceptor.intercept(XWorkPortalMenuInterceptor.java:100)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.webportal.interceptor.XWorkPortalParamsInterceptor.intercept(XWorkPortalParamsInterceptor.java:150)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.interceptor.ContextInterceptor.intercept(ContextInterceptor.java:83)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.interceptor.UserSettingInterceptor.intercept(UserSettingInterceptor.java:84)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.security.intercept.LoginInterceptor.intercept(LoginInterceptor.java:85)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.security.intercept.XWorkSecurityInterceptor.intercept(XWorkSecurityInterceptor.java:116)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.interceptor.SystemSettingInterceptor.intercept(SystemSettingInterceptor.java:135)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:139)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:254)

at com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at com.opensymphony.xwork2.interceptor.StaticParametersInterceptor.intercept(StaticParametersInterceptor.java:191)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.hisp.dhis.interceptor.ExceptionInterceptor.intercept(ExceptionInterceptor.java:113)

at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)

at org.apache.struts2.impl.StrutsActionProxy.execute(StrutsActionProxy.java:54)

at org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:562)

at org.apache.struts2.dispatcher.ng.ExecuteOperations.executeAction(ExecuteOperations.java:77)

at org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter.doFilter(StrutsPrepareAndExecuteFilter.java:99)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:330)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:118)

at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:84)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:113)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:103)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:113)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:154)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:45)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:150)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:199)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.hisp.dhis.security.filter.CustomAuthenticationFilter.doFilter(CustomAuthenticationFilter.java:64)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:110)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.hisp.dhis.security.filter.AutomaticAccessFilter.doFilter(AutomaticAccessFilter.java:115)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:57)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:50)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:87)

at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:342)

at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:192)

at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:160)

at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:344)

at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:261)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)

at org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:150)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)

at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)

at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)

at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1650)

at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:583)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)

at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)

at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)

at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1125)

at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)

at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)

at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1059)

at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)

at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)

at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)

at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)

at org.eclipse.jetty.server.Server.handle(Server.java:485)

at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:290)

at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:248)

at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)

at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:606)

at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:535)

at java.lang.Thread.run(Thread.java:724)

Hi Lars,

Greetings, I am looking through this thread, but I cannot see how or if it was resolved. I am seeing the same problem right now. Can you please post the response?

BR

Hi @Jerome.S,
As this is a 7 years old topic, it must have probably been resolved/changed and maybe the error you are seeing is generic, so please would it be possible to share screenshots of what you are facing? Will be great if you can reproduce this in any of the play.dhis2.org instance and send the steps! Depending on the issue, it might be required that you send Network log and maybe catalina log (without sharing any sensitive info!)

Thanks!