← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] resource table process failed

 

Dear Channara,

This date is '1975-01-01' duplicated in your period table.
Look out for the same date from the period table with wrong (or mutliple)
periodTypeId e.g 1975-01-01 as startdate and 1975-01-01 as enddate with
periodTypeId of 3 (yet 3 is monthly).

Alex

On Wed, Mar 30, 2016 at 11:07 AM, channara rin <rin.channara@xxxxxxxxx>
wrote:

> Dear all,
> I got this error in console. Could you help me how to fix this problem?
>
> Thank you
> Channara
>
> ::::::Console::::
> > Resource table process failed, please check the logs. Time:
> 2016-03-30T07:30:17.405+07:00. Message: PreparedStatementCallback; SQL
> [insert into _dateperiodstructure values (?,?,?,?,?,?,?,?,?,?,?,?)]; ERROR:
> duplicate key value violates unique constraint "_dateperiodstructure_pkey"
> > Detail: Key (dateperiod)=(1975-01-01) already exists.; nested exception
> is org.postgresql.util.PSQLException: ERROR: duplicate key value violates
> unique constraint "_dateperiodstructure_pkey"
> > Detail: Key (dateperiod)=(1975-01-01) already exists. Cause:
> org.postgresql.util.PSQLException: ERROR: duplicate key value violates
> unique constraint "_dateperiodstructure_pkey"
> > Detail: Key (dateperiod)=(1975-01-01) 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.sendQuery(
> QueryExecutorImpl.java:1130)
> > at org.postgresql.core.v3.QueryExecutorImpl.execute(
> QueryExecutorImpl.java:396)
> > at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(
> AbstractJdbc2Statement.java:2892)
> > at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(
> NewProxyPreparedStatement.java:1723)
> > at org.springframework.jdbc.core.JdbcTemplate$4.doInPreparedStatement(
> JdbcTemplate.java:1005)
> > at org.springframework.jdbc.core.JdbcTemplate$4.doInPreparedStatement(
> JdbcTemplate.java:989)
> > at org.springframework.jdbc.core.JdbcTemplate.execute(
> JdbcTemplate.java:644)
> > at org.springframework.jdbc.core.JdbcTemplate.execute(
> JdbcTemplate.java:673)
> > at org.springframework.jdbc.core.JdbcTemplate.batchUpdate(
> JdbcTemplate.java:989)
> > at org.springframework.jdbc.core.BatchUpdateUtils.executeBatchUpdate(
> BatchUpdateUtils.java:32)
> > at org.springframework.jdbc.core.JdbcTemplate.batchUpdate(
> JdbcTemplate.java:1039)
> > at org.springframework.jdbc.core.JdbcTemplate.batchUpdate(
> JdbcTemplate.java:1034)
> > at org.hisp.dhis.resourcetable.jdbc.JdbcResourceTableStore.batchUpdate(
> JdbcResourceTableStore.java:101)
> > at org.hisp.dhis.resourcetable.DefaultResourceTableService.
> generateDatePeriodTable(DefaultResourceTableService.java:456)
> > at sun.reflect.GeneratedMethodAccessor903.invoke(Unknown Source)
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> > at java.lang.reflect.Method.invoke(Unknown Source)
> > at org.springframework.aop.support.AopUtils.
> invokeJoinpointUsingReflection(AopUtils.java:317)
> > at org.springframework.aop.framework.JdkDynamicAopProxy.
> invoke(JdkDynamicAopProxy.java:201)
> > at com.sun.proxy.$Proxy104.generateDatePeriodTable(Unknown Source)
> > at org.hisp.dhis.resourcetable.scheduling.ResourceTableTask.
> generateAll(ResourceTableTask.java:121)
> > at org.hisp.dhis.resourcetable.scheduling.ResourceTableTask.
> run(ResourceTableTask.java:85)
> > at org.hisp.dhis.scheduling.ScheduledTasks.run(ScheduledTasks.java:60)
> > at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl
> e.run(DelegatingErrorHandlingRunnable.java:54)
> > at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(
> ReschedulingRunnable.java:81)
> > at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
> > at java.util.concurrent.FutureTask.run(Unknown Source)
> > at java.util.concurrent.ScheduledThreadPoolExecutor$
> ScheduledFutureTask.access$201(Unknown Source)
> > at java.util.concurrent.ScheduledThreadPoolExecutor$
> ScheduledFutureTask.run(Unknown Source)
> > at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
> > at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
> > at java.lang.Thread.run(Unknown Source)
> >
> >
> >
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-users
> Post to     : dhis2-users@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-users
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 
Alex Tumwesigye

Technical Advisor - DHIS2 (Consultant),
Ministry of Health/AFENET
Kampala
Uganda
+256 774149 775, + 256 759 800161
Skype ID: talexie

IT Consultant (Servers, Networks and Security, Health Information Systems -
DHIS2, Disease Outbreak & Surveillance Systems) & Solar Consultant


"I don't want to be anything other than what I have been - one tree hill "

Follow ups

References