← Back to team overview

dhis2-devs team mailing list archive

Re: [Bug 1474419] Re: metadata import into empty db in 2.19 dhis2 fails

 

Rishi,

Is data coming from a 2.19 instance or lower instance?

Why don't try this:
 Import metadata into 2.18 (which you said it works), then upgrade to 2.19
(make sure you run the script provided for upgrade), then export metadata.
Use the metadata exported from 2.19 and import it into a new 2.19 database
and you see if you replicate the error.
It may due to constraints added in 2.19.

Alex

On Fri, Jul 24, 2015 at 3:39 PM, Rishi <rsukul@xxxxxxxxxxxxxxxxx> wrote:

> HI Alex,
> It Is a unique constraint violation, I assume on inserting data from the
> metadata import, which is strange cause the database is empty.  See below
> the translation
>
> error 2015... .....Duplicate key violation
> of the  unique constraint    «uk_pbj3u1nk9vnuof8f47utvowmv»
> Detail: The key already exists.
>
>
> ERROR 2015-07-24 11:14:49,033 ERROR: llave duplicada viola
> restricción de unicidad «uk_pbj3u1nk9vnuof8f47utvowmv»
>   Detail: Ya existe la llave (name)=(default).
> (SqlExceptionHelper.java [taskScheduler-1])
>
> --
> You received this bug notification because you are a member of DHIS 2
> developers, which is subscribed to DHIS.
> https://bugs.launchpad.net/bugs/1474419
>
> Title:
>   metadata import into empty db in 2.19 dhis2 fails
>
> Status in DHIS:
>   New
>
> Bug description:
>   Dhis2 version: 2.19
>   tested: local and with the demo Sierra Leone server.
>   OS: Local Windows 7, tomcat(-7.0.62) , postgres 9.4
>   browser: Firefox and Chrome.
>
>   Problem statement
>   Dhis2 version 2.19 fails  to imports metadate into empty database. Goes
> fine with 2.18 version.
>
>   How tested
>    Test 1. Do a default meta data export in msf dhis2 data on dhis2
> version 2.19.
>   Stop tomcat, drop database , create a new empty database.
>   1.    Start tomcat, start metadata import as admin user.
>   2.    Check import summary, see Detailed error description below.
>
>   Detailed error description
>   Import never finishes it gets ‘stuck’  during importing  of Data sets.
>
>   In tomcat cat log the following is found.
>   SEVERE: Servlet.service() for servlet [webapi] in context with path
> [/dhis] threw exception
>   org.springframework.dao.DataIntegrityViolationException: could not
> execute statement; SQL [n/a]; constraint [null]; nested exception is
> org.hibernate.exception.ConstraintViolationException: could not execute
> statement
>         at … (a lot of java class exceptions calls that are not helpful)
>
>   Test 2, same but then with an meta data export into  the Sierra Leone
> demo server. With same result ( as described in the detailed err
> description).
>   Test 3. Same but then with 2.18 version of dhis2 installed local and
> with a dhis2 import with Sierra leone demo data and our data,  both goes
> fine.
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/dhis2/+bug/1474419/+subscriptions
>
> _______________________________________________
> 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
>



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

References