← Back to team overview

dhis2-users team mailing list archive

Tracker capture: error in registration

 

Dear all,

I created two programmes, and I have the same message "Error in registration" when trying to register a patient.

Could anyone help me understanding my log? I am working on DHIS2 v2.21, build 20879.

Thanks in advance,

Here it is:

* WARN  2016-01-25 19:22:19,704 SQL Error: 0, SQLState: 23505 (SqlExceptionHelper.java [http-bio-8080-exec-7])
* ERROR 2016-01-25 19:22:19,705 ERROR: duplicate key value violates unique constraint "program_organisationunits_pkey"
  Detail: Key (programid, organisationunitid)=(5118, 4935) already exists. (SqlExceptionHelper.java [http-bio-8080-exec-7])
* ERROR 2016-01-25 19:22:19,916 Error while executing action (ExceptionInterceptor.java [http-bio-8080-exec-7])
org.springframework.dao.DataIntegrityViolationException: could not execute statement; SQL [n/a]; constraint [program_organisationunits_pkey]; nested exception is org.hibernate.exception.ConstraintViolationException: could not execute statement
               at org.springframework.orm.hibernate4.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:163)
               at org.springframework.orm.hibernate4.HibernateTransactionManager.convertHibernateAccessException(HibernateTransactionManager.java:730)
               at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:592)
               at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:757)
               at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:726)
               at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:521)
               at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:291)
               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.$Proxy61.mergeWithCurrentUserOrganisationUnits(Unknown Source)
               at org.hisp.dhis.trackedentity.action.program.DefineProgramAssociationsAction.execute(DefineProgramAssociationsAction.java:87)
               at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
               at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
               at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
               at java.lang.reflect.Method.invoke(Unknown Source)
               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:85)
               at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
               at org.hisp.dhis.webportal.interceptor.XWorkPortalModuleInterceptor.intercept(XWorkPortalModuleInterceptor.java:86)
               at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
               at org.hisp.dhis.webportal.interceptor.XWorkPortalMenuInterceptor.intercept(XWorkPortalMenuInterceptor.java:94)
               at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:246)
               at org.hisp.dhis.webportal.interceptor.XWorkPortalParamsInterceptor.intercept(XWorkPortalParamsInterceptor.java:149)
               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:115)
               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.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.hisp.dhis.security.filter.CorsFilter.doFilter(CorsFilter.java:123)
               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.oauth2.provider.authentication.OAuth2AuthenticationProcessingFilter.doFilter(OAuth2AuthenticationProcessingFilter.java:140)
               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.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:107)
               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:85)
               at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
               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:505)
               at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
               at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
               at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
               at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
               at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
               at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
               at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
               at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:318)
               at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
               at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
               at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
               at java.lang.Thread.run(Unknown Source)
Caused by: org.hibernate.exception.ConstraintViolationException: could not execute statement
               at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129)
               at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
               at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124)
               at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)
               at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:189)
               at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:59)
               at org.hibernate.persister.collection.AbstractCollectionPersister.insertRows(AbstractCollectionPersister.java:1474)
               at org.hibernate.action.internal.CollectionUpdateAction.execute(CollectionUpdateAction.java:86)
               at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395)
               at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387)
               at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:308)
               at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349)
               at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
               at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1195)
               at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404)
               at org.hibernate.engine.transaction.internal.jdbc.JdbcTransaction.beforeTransactionCommit(JdbcTransaction.java:101)
               at org.hibernate.engine.transaction.spi.AbstractTransactionImpl.commit(AbstractTransactionImpl.java:175)
               at org.springframework.orm.hibernate4.HibernateTransactionManager.doCommit(HibernateTransactionManager.java:584)
               ... 118 more
Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint "program_organisationunits_pkey"
  Detail: Key (programid, organisationunitid)=(5118, 4935) already exists.
               at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
               at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
               at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
               at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
               at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
               at org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)
               at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
               at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:186)
               ... 131 more

Dr. Lise Grout
Epidemiologist

World Health Organization
Department of Neglected Tropical Diseases (HTM/NTD/IDM)
Innovative and Intensified Disease Management Unit
20, Avenue Appia; CH-1211 Geneva 27
Tel. +41 22 791 2341
Mobile +41 79 290 68 61
Skype: tigrouveto
http://www.who.int/neglected_diseases


Follow ups