← Back to team overview

dhis2-devs team mailing list archive

Re: Metadata Import fails due to modifying a program description

 

The same also applies to the Program description of the Program stages as
well. After export, the program descriptions of program as well as program
stages get cleared at the first instance and are not imported into the
second instance, throwing an exception as mentioned in the previous mail.

Archana Chillala
Application Developer
Email archanac@xxxxxxxxxxxxxxxx
Telephone +91 9100960533 <+91+9100960533>
[image: ThoughtWorks]
<http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>

On Thu, Mar 10, 2016 at 12:27 PM, Archana Chillala <
archanac@xxxxxxxxxxxxxxxx> wrote:

> Hi Morten,
>
> We have two instances of DHIS. On one instance, we have some sample
> metadata which is exported and imported into the other instance. On the
> first instance, we tried to update the program description of a program and
> import into the other instance. This is throwing an exception during
> import. Also, the program description at the first instance is cleared
> after export. Is this a known issue?
>
> Following are the logs generated for the issue:
>
> WARN  2016-03-10 12:02:02,283 SQL Error: 0, SQLState: 23505
> (SqlExceptionHelper.java [taskScheduler-6])
>
> * ERROR 2016-03-10 12:02:02,283 *ERROR: duplicate key value violates
> unique constraint "programtrackedentityattribute_unique_key"*
>
>   Detail: Key (programid, trackedentityattributeid)=(801, 708) already
> exists. (SqlExceptionHelper.java [taskScheduler-6])
>
> org.*hibernate.exception.ConstraintViolationException: could not execute
> statement*
>
>     at
> org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:129)
>
>     at
> org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:49)
>
>     at
> org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:124)
>
>     at
> org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:109)
>
>     at
> org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:189)
>
>     at
> org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:59)
>
>     at
> org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3079)
>
>     at
> org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3521)
>
>     at
> org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:88)
>
>     at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395)
>
>     at
> org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387)
>
>     at
> org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:303)
>
>
> Could you please look into the issue and help fix this?
>
>
>
>
> *Thanks*
>
> Archana Chillala
> Application Developer
> Email archanac@xxxxxxxxxxxxxxxx
> Telephone +91 9100960533 <+91+9100960533>
> [image: ThoughtWorks]
> <http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator>
>

Follow ups

References