dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32693
Fwd: Error on browser
Forgot to cc.
Also note I made a small correction to the sql. should be:
DELETE FROM systemsetting USING systemsetting ss
WHERE systemsetting.name = ss.name AND systemsetting.systemsettingid >
ss.systemsettingid;
But I am still baffled how you could have ended up with these duplicates.
---------- Forwarded message ----------
From: Bob Jolliffe <bobjolliffe@xxxxxxxxx>
Date: 9 September 2014 12:37
Subject: Re: Error on browser
To: Muhire Andrew <muhireandrew@xxxxxxxxx>
I see lots of duplicate keys in there. You say this happened when starting
dhis (2.16 build number?) with an empty database?
Can you verify again with a blank database? I don't think anyone else has
seen this behaviour. I know I haven't. Copying to devs list ..
I am unable to reproduce because there is a constraint which is preventing
the creation of such duplicates.
As a workaround you could "manually" delete the duplicate settings,
something like:
DELETE FROM systemsetting USING systemsetting ss
WHERE systemsetting.name = ss.name AND systemsetting.systemsettingid >
ss.id;
Bob
On 9 September 2014 12:12, Muhire Andrew <muhireandrew@xxxxxxxxx> wrote:
> Here is the systemsetting for postgress
> fmoh=# SELECT * FROM systemsetting;
> systemsettingid | name
> |
> value
>
> -----------------+----------------------------+--------------------------------------------------------------------------------------------------
> 49 | applicationTitle |
> \xaced000574001a4665646572616c204d696e6973747279206f66204865616c7468
> 52 | keyApplicationIntro |
> \xaced000574001457656c636f6d6520746f20464d4f482f484d4953
> 53 | keyApplicationNotification |
> \xaced00057400244865616c7468204d616e6167656d656e7420496e666f726d6174696f6e2073797374656d
> 55 | keyApplicationFooter |
> \xaced0005740020537564616e204665646572616c204d696e6973747279206f66204865616c7468
> 57 | keyFlag |
> 59 | startModule |
> \xaced000574001e646869732d7765622d64617368626f6172642d696e746567726174696f6e
> 62 | keyCustomLoginPageLogo |
> \xaced0005737200116a6176612e6c616e672e426f6f6c65616ecd207280d59cfaee0200015a000576616c7565787000
> 63 | keyCustomTopMenuLogo |
> \xaced0005737200116a6176612e6c616e672e426f6f6c65616ecd207280d59cfaee0200015a000576616c7565787000
> 65 | currentStyle |
> \xaced00057400196c696768745f626c75652f6c696768745f626c75652e637373
> 50 | applicationTitle |
> \xaced000574001a4665646572616c204d696e6973747279206f66204865616c7468
> 51 | keyApplicationIntro |
> \xaced000574001457656c636f6d6520746f20464d4f482f484d4953
> 54 | keyApplicationNotification |
> \xaced00057400244865616c7468204d616e6167656d656e7420496e666f726d6174696f6e2073797374656d
> 56 | keyApplicationFooter |
> \xaced0005740020537564616e204665646572616c204d696e6973747279206f66204865616c7468
> 58 | keyFlag |
> 60 | startModule |
> \xaced000574001e646869732d7765622d64617368626f6172642d696e746567726174696f6e
> 61 | keyCustomLoginPageLogo |
> \xaced0005737200116a6176612e6c616e672e426f6f6c65616ecd207280d59cfaee0200015a000576616c7565787000
> 64 | keyCustomTopMenuLogo |
> \xaced0005737200116a6176612e6c616e672e426f6f6c65616ecd207280d59cfaee0200015a000576616c7565787000
> 66 | currentStyle |
> \xaced00057400196c696768745f626c75652f6c696768745f626c75652e637373
>
>
>
>
>
> ------------------------------
> "Better Information, better Decisions, better Health"
>
>
> * MUHIRE Andrew*
> * Head of HMIS / Ministry of Health*
> *""A mind is a terrible thing to waste""*
> --------------------------------------
> ** Cell:(+250)788436150**
> *** Twitter :muhire_andrew***
> **** skype:muhire_andrew****
> link to HMIS system: https://hmis.moh.gov.rw/hmis
> <http://hmis.moh.gov.rw/hmis>
>
>
> On Tuesday, September 9, 2014 12:05 PM, Bob Jolliffe <
> bobjolliffe@xxxxxxxxx> wrote:
>
>
> check anyway. It could be a bug.
>
> On 9 September 2014 11:03, Muhire Andrew <muhireandrew@xxxxxxxxx> wrote:
>
> Its a fresh database......
>
>
>
>
> ------------------------------
> "Better Information, better Decisions, better Health"
>
>
> * MUHIRE Andrew*
> * Head of HMIS / Ministry of Health*
> *""A mind is a terrible thing to waste""*
> --------------------------------------
> ** Cell:(+250)788436150**
> *** Twitter :muhire_andrew***
> **** skype:muhire_andrew****
> link to HMIS system: https://hmis.moh.gov.rw/hmis
> <http://hmis.moh.gov.rw/hmis>
>
>
> On Tuesday, September 9, 2014 12:02 PM, Muhire Andrew <
> muhireandrew@xxxxxxxxx> wrote:
>
>
> ok
>
>
> ------------------------------
> "Better Information, better Decisions, better Health"
>
>
> * MUHIRE Andrew*
> * Head of HMIS / Ministry of Health*
> *""A mind is a terrible thing to waste""*
> --------------------------------------
> ** Cell:(+250)788436150**
> *** Twitter :muhire_andrew***
> **** skype:muhire_andrew****
> link to HMIS system: https://hmis.moh.gov.rw/hmis
> <http://hmis.moh.gov.rw/hmis>
>
>
> On Tuesday, September 9, 2014 11:55 AM, Bob Jolliffe <
> bobjolliffe@xxxxxxxxx> wrote:
>
>
> It looks like you have a duplicate system setting name in your database.
> Can you take a look in the systemsetting table and see?
>
> On 9 September 2014 10:31, Muhire Andrew <muhireandrew@xxxxxxxxx> wrote:
>
> I have installed the server , it worked but after this is the message on
> browser?
>
> org.hibernate.NonUniqueResultException: query did not return a unique result: 2
>
>
> Logs
> INFO: Initializing Spring FrameworkServlet 'webapi'
> * WARN 2014-09-09 03:01:11,917 Did not find any ViewResolvers to delegate
> to; please configure them using the 'viewResolvers' property on the
> ContentNegotiatingViewResolver (ContentNegotiatingViewResolver.java
> [localhost-startStop-1])
> Sep 09, 2014 3:01:12 AM org.apache.catalina.core.ApplicationContext log
> INFO: Initializing Spring FrameworkServlet 'ohie'
> * WARN 2014-09-09 03:01:15,233 Did not find any ViewResolvers to delegate
> to; please configure them using the 'viewResolvers' property on the
> ContentNegotiatingViewResolver (ContentNegotiatingViewResolver.java
> [localhost-startStop-1])
> Sep 09, 2014 3:01:15 AM org.apache.catalina.core.ApplicationContext log
> INFO: Initializing Spring FrameworkServlet 'mobile'
> Sep 09, 2014 3:01:16 AM org.apache.coyote.AbstractProtocol start
> INFO: Starting ProtocolHandler ["http-bio-127.0.0.1-8080"]
> Sep 09, 2014 3:01:16 AM org.apache.catalina.startup.Catalina start
> INFO: Server startup in 98424 ms
> Sep 09, 2014 3:01:21 AM com.hazelcast.util.HealthMonitor
> INFO: [127.0.0.1]:5701 [dev] [3.2.1] memory.used=425.6M, memory.free=1.5G,
> memory.total=1.9G, memory.max=1.9G, memory.used/total=22.02%,
> memory.used/max=22.02%, load.process=69.00%, load.system=81.00%,
> load.systemAverage=134.00%, thread.count=33, thread.peakCount=33,
> event.q.size=0, executor.q.async.size=0, executor.q.client.size=0,
> executor.q.operation.size=0, executor.q.query.size=0,
> executor.q.scheduled.size=0, executor.q.io.size=0,
> executor.q.system.size=0, executor.q.operation.size=0,
> executor.q.priorityOperation.size=0, executor.q.response.size=0,
> operations.remote.size=0, operations.running.size=0, proxy.count=195,
> clientEndpoint.count=0, connection.active.count=0, connection.count=0
> * ERROR 2014-09-09 03:03:21,235 Error while executing action
> (ExceptionInterceptor.java [tomcat-http-1])
> org.hibernate.NonUniqueResultException: query did not return a unique
> result: 2
> at
> org.hibernate.internal.AbstractQueryImpl.uniqueElement(AbstractQueryImpl.java:914)
> at
> org.hibernate.internal.CriteriaImpl.uniqueResult(CriteriaImpl.java:396)
> at
> org.hisp.dhis.setting.hibernate.HibernateSystemSettingStore.getByName(HibernateSystemSettingStore.java:45)
> at
> org.hisp.dhis.setting.DefaultSystemSettingManager.getSystemSetting(DefaultSystemSettingManager.java:102)
> 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:183)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:150)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:96)
> at
> org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:260)
> at
> org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:94)
> at
> org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)
> at
> org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
> at com.sun.proxy.$Proxy27.getSystemSetting(Unknown Source)
> at
> org.hisp.dhis.interceptor.SystemSettingInterceptor.intercept(SystemSettingInterceptor.java:96)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> at
> org.hisp.dhis.interceptor.I18nInterceptor.intercept(I18nInterceptor.java:136)
> at
> com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
> at
> com.opensymphony.xwork2.interceptor.ParametersInterceptor.doIntercept(ParametersInterceptor.java:249)
> 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:110)
> 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.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> 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:113)
> 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:106)
> 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:343)
> at
> org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:260)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.springframework.orm.hibernate4.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:151)
> at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:88)
> at
> org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:106)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
> at
> org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1040)
> at
> org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607)
> at
> org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:313)
> at
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
> at
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
>
>
>
> ------------------------------
> "Better Information, better Decisions, better Health"
>
>
> * MUHIRE Andrew*
> * Head of HMIS / Ministry of Health*
> *""A mind is a terrible thing to waste""*
> --------------------------------------
> ** Cell:(+250)788436150**
> *** Twitter :muhire_andrew***
> **** skype:muhire_andrew****
> link to HMIS system: https://hmis.moh.gov.rw/hmis
> <http://hmis.moh.gov.rw/hmis>
>
>
>
>
>
>
>
>
>
>