← Back to team overview

dhis2-devs team mailing list archive

Re: [Dhis2-users] dhis2 2, 18 resource table generate Bugs

 

Fatema,

It seems like you have a duplicate period in the period table, as Alex says
- which actually should not be possible because there is supposed to be a
constraint on the period table that ensures unique periods
(periodtype+startdate+enddate must be unique).

If you have access to the PostgreSQL instance - either directly or via
pgremote - then verify that there are THREE constraints on the period
table. If one is missing, you can pick the SQL code to re-create it from
another instance (e.g. the demo if you have it installed on your
localhost). If that fails, you must first identify and manually remove one
of the duplicates.

A second possibility is that Alex is suggesting - that you have e.g. a
daily period (which means that startdate=enddate) where the periodtype
erroneously have been specified as something else.

Regards
Calle

On 20 March 2015 at 13:22, Alex Tumwesigye <atumwesigye@xxxxxxxxx> wrote:

> Dear Fatema,
>
> If I remember correctly, this used to be an issue in 2.16. I guess, it has
> been carried to 2.18.
>
> The problem was that, two similar dates were created and when you try to
> run the resource table, that range is already created.
> Query the period table directly for this date "2009-12-31", two
> duplicates may exist.Please try to attempt to compare ranges for different
> period types, this is where the problem is (You will encounter a range that
> is meant to be for a week, yet it is assigned to daily or monthly)
> If so, you may need drop it manually for the resource tables to be
> generated.
> Let me look for the script
>
> Thanks.
>
> Alex
>
>
> On Fri, Mar 20, 2015 at 2:06 PM, Uddin Fatema <fatemacse@xxxxxxxxx> wrote:
>
>> 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>
>>
>>
>> _______________________________________________
>> 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
>
> IT Consultant - BarefootPower Uganda Ltd, SmartSolar, Kenya
>
> IT Specialist (Servers, Networks and Security, Health Information Systems
> - DHIS2 ) & Solar Consultant
>
> +256 774149 775, + 256 759 800161
>
> "I don't want to be anything other than what I have been - one tree hill "
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>


-- 

*******************************************

Calle Hedberg

46D Alma Road, 7700 Rosebank, SOUTH AFRICA

Tel/fax (home): +27-21-685-6472

Cell: +27-82-853-5352

Iridium SatPhone: +8816-315-19274

Email: calle.hedberg@xxxxxxxxx

Skype: calle_hedberg

*******************************************

References