← Back to team overview

dhis2-devs team mailing list archive

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

 

Fatema,

Can you dump for me the enddate, startdate and periodtype from period table
for that date '2009-12-31'

I need to see the output of "select enddate,startdate,periodtypeid from
period where enddate like '2009-12-31' or startdate like '2009-12-31' "

Thanks.

Alex

On Fri, Mar 20, 2015 at 3:20 PM, Calle Hedberg <calle.hedberg@xxxxxxxxx>
wrote:

> Did you verify that all three constraints are in place on the period table?
>
> If they are and you are 100% sure there are no duplicates, then I don't
> know - I've had similar error messages a couple of times, but removing the
> duplicates and re-inserting the constraint have always sorted it out.
>
> Clear cache (DHIS and browser), empty resource tables, re-start tomcat -
> I'm not aware of any other tricks....
>
> Regards
> Calle
>
> On 20 March 2015 at 14:15, Uddin Fatema <fatemacse@xxxxxxxxx> wrote:
>
>> Thanks Calle,
>>
>> I have already checked all part and this period is daily, so startdate
>> and enddate is same 2009-12-31
>>
>> However, my problem is remains same
>>
>> What can i do.
>>
>>
>> On Fri, Mar 20, 2015 at 6:11 PM, Calle Hedberg <calle.hedberg@xxxxxxxxx>
>> wrote:
>>
>>> Fatema,
>>>
>>> note that 2009-12-31 looks like an ENDdate, not a startdate.
>>>
>>> Regards
>>> Calle
>>>
>>> On 20 March 2015 at 14:09, Uddin Fatema <fatemacse@xxxxxxxxx> wrote:
>>>
>>>> Thanks Bharath Anna and Alex.
>>>>
>>>> Actually i checked period table with this( 2009-12-31) startdate and
>>>> there is no duplicate period with same startdate.
>>>>
>>>> Additionally, for test purpose i deleted this period from period table
>>>> and from other related table with this periodid.
>>>>
>>>> Several time restart the tomcat and clear the cash.
>>>>
>>>> Although, problem remain same.
>>>>
>>>> "Process failed: PreparedStatementCallback; 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 constraint "_dateperiodstructure_pkey" Detail: Key
>>>> (dateperiod)=(2009-12-31) already exists.
>>>> 2015-03-20 12:03:45 Generating resource tables  "
>>>>
>>>> What can i do now?
>>>>
>>>> On Fri, Mar 20, 2015 at 5:22 PM, 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 "
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> 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-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
>>>
>>> *******************************************
>>>
>>>
>>
>>
>> --
>> 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>
>>
>>
>
>
> --
>
> *******************************************
>
> 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
>
> *******************************************
>
>


-- 
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 "

Follow ups

References