Dear All, I have upgrade our application from 2.16 to 2.18. However, when we generate Resource table,we have get error. the error short note given in bellow.
ERROR, category: RESOURCETABLE_UPDATE, t ime: Fri Mar 20 16:52:29 BDT 2015, message: Process failed: PreparedStatementCal lback; SQL [insert into _dateperiodstructure values (?,?,?,?,?,?,?,?,?,?,?,?)]; ERROR: duplicate key value violates unique constraint "_dateperiodstructure_pkey " Detail: Key (dateperiod)=(2009-12-31) already exists.; nested exception is org .postgresql.util.PSQLException: ERROR: duplicate key value violates unique const raint "_dateperiodstructure_pkey" Detail: Key (dateperiod)=(2009-12-31) already exists.] (InMemoryNotifier.java [taskScheduler-1]) * ERROR 2015-03-20 16:52:29,445 Unexpected error occurred in scheduled task. (Ta skUtils.java [taskScheduler-1]) Additionally, here i attached the bug file. Could anyone please help us. -- Regards, *Fatema Uddin* Technical Advisor (HIS)-Support to the Health Sector Program II Deutsche Gesellschaft für Internationale Zusammenarbeit (GIZ) GmbH German House House 10/A-2, Road 90 Gulshan 2, Dhaka 1212, Bangladesh T +880 9666701000 F +880 28823099 M +880 19 6206 4721 I www.giz.de <https://owa.giz.de/owa/redir.aspx?C=mPQMujasE0-yL6Aa4ocPcnkcfUThJNEIi4h1DwsYjO3Ua20UR_COt6aTH1s4JIdR4p-jCoFsP6A.&URL=http%3a%2f%2fwww.giz.de%2f>
* INFO 2015-03-20 16:52:26,140 Date period table generated (DefaultResourceTabl eService.java [taskScheduler-1]) * INFO 2015-03-20 16:52:26,176 Create date period structure SQL: CREATE TABLE _ dateperiodstructure (dateperiod DATE NOT NULL PRIMARY KEY, "daily" VARCHAR(15), "weekly" VARCHAR(15), "monthly" VARCHAR(15), "bimonthly" VARCHAR(15), "quarterly " VARCHAR(15), "sixmonthly" VARCHAR(15), "sixmonthlyapril" VARCHAR(15), "yearly" VARCHAR(15), "financialapril" VARCHAR(15), "financialjuly" VARCHAR(15), "financ ialoct" VARCHAR(15)) (JdbcResourceTableStore.java [taskScheduler-1]) * INFO 2015-03-20 16:52:29,377 [Level: ERROR, category: RESOURCETABLE_UPDATE, t ime: Fri Mar 20 16:52:29 BDT 2015, message: Process failed: PreparedStatementCal lback; SQL [insert into _dateperiodstructure values (?,?,?,?,?,?,?,?,?,?,?,?)]; ERROR: duplicate key value violates unique constraint "_dateperiodstructure_pkey " Detail: Key (dateperiod)=(2009-12-31) already exists.; nested exception is org .postgresql.util.PSQLException: ERROR: duplicate key value violates unique const raint "_dateperiodstructure_pkey" Detail: Key (dateperiod)=(2009-12-31) already exists.] (InMemoryNotifier.java [taskScheduler-1]) * ERROR 2015-03-20 16:52:29,445 Unexpected error occurred in scheduled task. (Ta skUtils.java [taskScheduler-1]) org.springframework.dao.DuplicateKeyException: PreparedStatementCallback; SQL [i nsert into _dateperiodstructure values (?,?,?,?,?,?,?,?,?,?,?,?)]; ERROR: duplic ate key value violates unique constraint "_dateperiodstructure_pkey" Detail: Key (dateperiod)=(2009-12-31) already exists.; nested exception is org .postgresql.util.PSQLException: ERROR: duplicate key value violates unique const raint "_dateperiodstructure_pkey" Detail: Key (dateperiod)=(2009-12-31) already exists. at org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.d oTranslate(SQLErrorCodeSQLExceptionTranslator.java:239) at org.springframework.jdbc.support.AbstractFallbackSQLExceptionTranslat or.translate(AbstractFallbackSQLExceptionTranslator.java:73) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java: 660) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java: 673) at org.springframework.jdbc.core.JdbcTemplate.batchUpdate(JdbcTemplate.j ava:989) at org.springframework.jdbc.core.BatchUpdateUtils.executeBatchUpdate(Bat chUpdateUtils.java:32) at org.springframework.jdbc.core.JdbcTemplate.batchUpdate(JdbcTemplate.j ava:1039) at org.springframework.jdbc.core.JdbcTemplate.batchUpdate(JdbcTemplate.j ava:1034) at org.hisp.dhis.resourcetable.jdbc.JdbcResourceTableStore.batchUpdate(J dbcResourceTableStore.java:100) at org.hisp.dhis.resourcetable.DefaultResourceTableService.generateDateP eriodTable(DefaultResourceTableService.java:448) 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 org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflecti on(AopUtils.java:317) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynami cAopProxy.java:201) at com.sun.proxy.$Proxy98.generateDatePeriodTable(Unknown Source) at org.hisp.dhis.resourcetable.scheduling.ResourceTableTask.generateAll( ResourceTableTask.java:121) at org.hisp.dhis.resourcetable.scheduling.ResourceTableTask.run(Resource TableTask.java:85) at org.springframework.scheduling.support.DelegatingErrorHandlingRunnabl e.run(DelegatingErrorHandlingRunnable.java:54) at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) at java.util.concurrent.FutureTask$Sync.innerRun(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) Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violate s unique constraint "_dateperiodstructure_pkey" Detail: Key (dateperiod)=(2009-12-31) already exists. at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryEx ecutorImpl.java:2103) at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutor Impl.java:1836) at org.postgresql.core.v3.QueryExecutorImpl.sendQuery(QueryExecutorImpl. java:1091) at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.ja va:398) at org.postgresql.jdbc2.AbstractJdbc2Statement.executeBatch(AbstractJdbc 2Statement.java:2754) at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeBatch(NewPr oxyPreparedStatement.java:1723) at org.springframework.jdbc.core.JdbcTemplate$4.doInPreparedStatement(Jd bcTemplate.java:1005) at org.springframework.jdbc.core.JdbcTemplate$4.doInPreparedStatement(Jd bcTemplate.java:989) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java: 644) ... 25 more
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp