# \[issue\] Metadata Import fails when modifying a tracker program and tracker program stage

**URL:** <https://community.dhis2.org/t/issue-metadata-import-fails-when-modifying-a-tracker-program-and-tracker-program-stage/33469>\
**Category:** Support - Assistance technique\
**Created:** [4 November 2016 09:07 UTC](https://community.dhis2.org/t/issue-metadata-import-fails-when-modifying-a-tracker-program-and-tracker-program-stage/33469 "2016-11-04T09:07:25Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Archana\_Chillala](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/a/ce73a5/32.png) [@Archana\_Chillala](https://community.dhis2.org/u/Archana_Chillala)\
**Post date:** [4 November 2016 09:07 UTC](https://community.dhis2.org/t/issue-metadata-import-fails-when-modifying-a-tracker-program-and-tracker-program-stage/33469/1 "2016-11-04T09:07:25Z")

</div>

Hi,

We are using the latest version of DHIS 2.25 (build - 5e16867). We have two instances of DHIS and are trying to sync metadata from one instance to the other. Sync is failing for the following cases.

\*\*Modifying a Tracker program (i.e. program “with registration”) \*\*

- INFO 2016-11-02 16:36:27,877 (admin) Creating 1 object(s) of type ProgramTrackedEntityAttribute (DefaultObjectBundleService.java [http-bio-8080-exec-7])

- **WARN 2016-11-02 16:36:27,902 SQL Error: 0, SQLState: 23505 (SqlExceptionHelper.java [http-bio-8080-exec-7])**

**\* ERROR 2016-11-02 16:36:27,903 ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”**

**Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists. (SqlExceptionHelper.java [http-bio-8080-exec-7])**

**\* ERROR 2016-11-02 16:36:27,916 Exception occurred while trying to import the metadata. could not execute statement (MetadataSyncImportHandler.java [http-bio-8080-exec-7])**

**org.hibernate.exception.ConstraintViolationException: could not execute statement**

```
at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)

at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)

at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)

at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)

at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)

at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45)

at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2921)

at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3421)

at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89)

at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)

at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)

at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)

at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)

at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)

at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

```

Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”

Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists.

```
at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)

at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)

at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)

at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)

at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)

at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)

at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)

at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)

```

**Modifying the program stage of a Tracker program (i.e. program “with registration”)**

- INFO 2016-11-02 16:55:26,050 (admin) Updating 1 object(s) of type ProgramStage (DefaultObjectBundleService.java [http-bio-8080-exec-10])

- INFO 2016-11-02 16:55:26,065 (admin) Updating 2 object(s) of type ProgramStageDataElement (DefaultObjectBundleService.java [http-bio-8080-exec-10])

- **ERROR 2016-11-02 16:55:26,073 Exception occurred while trying to import the metadata. Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 (MetadataSyncImportHandler.java [http-bio-8080-exec-10])**

**org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1**

```
at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67)

at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54)

at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:46)

at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3106)

at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2985)

at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3365)

at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)

at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)

at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)

at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)

at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)

at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)

at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:498)

at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)

at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)

at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)

at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)

at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)

at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)

at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)

at com.sun.proxy.$Proxy186.commit(Unknown Source)

```

Could you please help fix the issues.

_Cheers,_

> **···**
>
> Archana Chillala  
> Application Developer  
> Email  
> [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> Telephone  
> +91 9100960533  
> [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)

---

<div class="post-metadata">

**Author:** ![Markus](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/m/b782af/32.png) [@Markus](https://community.dhis2.org/u/Markus)\
**Post date:** [4 November 2016 09:59 UTC](https://community.dhis2.org/t/issue-metadata-import-fails-when-modifying-a-tracker-program-and-tracker-program-stage/33469/2 "2016-11-04T09:59:08Z")

</div>

Hi Archana!

I’ll let Morten or someone else comment on possible fixes, but recently had the same problem as you describe in “with registration” below. I didn’t dig to the bottom of it but found a workaround: You can manually clean out the program\_attribute rows connected to the program(s) being imported.

**delete from program\_attributes where programid = ;**

The second problem you describe you should be able to work around in the same way, but then cleaning out the programstagedataelements entries for your program(s).

**delete from programstagedataelement where programstageid in(select programstageid from programstage where programid = );**

If trying this workarounds you should back up your db first.

Markus

> **···**
>
> Archana Chillala  
> Application Developer  
> Email  
> [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> Telephone  
> +91 9100960533  
> [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)

---

<div class="post-metadata">

**Author:** ![morten](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/morten/32/36295_2.png) [@morten](https://community.dhis2.org/u/morten)\
**Post date:** [9 November 2016 03:14 UTC](https://community.dhis2.org/t/issue-metadata-import-fails-when-modifying-a-tracker-program-and-tracker-program-stage/33469/3 "2016-11-09T03:14:36Z")

</div>

Hi Archana

I’m looking into this now.

> **···**
>
> On Fri, Nov 4, 2016 at 4:07 PM, Archana Chillala [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com) wrote:
> 
> > Hi,
> 
> > 
> 
> > We are using the latest version of DHIS 2.25 (build - 5e16867). We have two instances of DHIS and are trying to sync metadata from one instance to the other. Sync is failing for the following cases.
> 
> > 
> 
> > 
> 
> > \*\*Modifying a Tracker program (i.e. program “with registration”) \*\*
> 
> > 
> 
> > - INFO 2016-11-02 16:36:27,877 (admin) Creating 1 object(s) of type ProgramTrackedEntityAttribute (DefaultObjectBundleService.java [http-bio-8080-exec-7])
> 
> > - **WARN 2016-11-02 16:36:27,902 SQL Error: 0, SQLState: 23505 (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,903 ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”**
> 
> > **Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists. (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,916 Exception occurred while trying to import the metadata. could not execute statement (MetadataSyncImportHandler.java [http-bio-8080-exec-7])**
> 
> > **org.hibernate.exception.ConstraintViolationException: could not execute statement**
> 
> > at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
> 
> > at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
> 
> > at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2921)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3421)
> 
> > at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”
> 
> > Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists.
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
> 
> > at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)
> 
> > at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > **Modifying the program stage of a Tracker program (i.e. program “with registration”)**
> 
> > - INFO 2016-11-02 16:55:26,050 (admin) Updating 1 object(s) of type ProgramStage (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - INFO 2016-11-02 16:55:26,065 (admin) Updating 2 object(s) of type ProgramStageDataElement (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - **ERROR 2016-11-02 16:55:26,073 Exception occurred while trying to import the metadata. Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 (MetadataSyncImportHandler.java [http-bio-8080-exec-10])**
> 
> > **org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1**
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67)
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54)
> 
> > at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:46)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3106)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2985)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3365)
> 
> > at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 
> > at java.lang.reflect.Method.invoke(Method.java:498)
> 
> > at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
> 
> > at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> 
> > at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
> 
> > at com.sun.proxy.$Proxy186.commit(Unknown Source)
> 
> > 
> 
> > 
> 
> > Could you please help fix the issues.
> 
> > 
> 
> > 
> 
> > _Cheers,_
> 
> > 
> 
> > Archana Chillala  
> > Application Developer  
> > Email  
> > [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> > Telephone  
> > +91 9100960533  
> > [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)

---

<div class="post-metadata">

**Author:** ![morten](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/morten/32/36295_2.png) [@morten](https://community.dhis2.org/u/morten)\
**Post date:** [9 November 2016 04:44 UTC](https://community.dhis2.org/t/issue-metadata-import-fails-when-modifying-a-tracker-program-and-tracker-program-stage/33469/4 "2016-11-09T04:44:19Z")

</div>

This should be fixed in latest 225/master (2.24 was not affected)

> **···**
>
> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > Hi Archana
> 
> > I’m looking into this now.
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Fri, Nov 4, 2016 at 4:07 PM, Archana Chillala [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com) wrote:
> 
> > Hi,
> 
> > 
> 
> > We are using the latest version of DHIS 2.25 (build - 5e16867). We have two instances of DHIS and are trying to sync metadata from one instance to the other. Sync is failing for the following cases.
> 
> > 
> 
> > 
> 
> > \*\*Modifying a Tracker program (i.e. program “with registration”) \*\*
> 
> > 
> 
> > - INFO 2016-11-02 16:36:27,877 (admin) Creating 1 object(s) of type ProgramTrackedEntityAttribute (DefaultObjectBundleService.java [http-bio-8080-exec-7])
> 
> > - **WARN 2016-11-02 16:36:27,902 SQL Error: 0, SQLState: 23505 (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,903 ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”**
> 
> > **Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists. (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,916 Exception occurred while trying to import the metadata. could not execute statement (MetadataSyncImportHandler.java [http-bio-8080-exec-7])**
> 
> > **org.hibernate.exception.ConstraintViolationException: could not execute statement**
> 
> > at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
> 
> > at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
> 
> > at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:45)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2921)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3421)
> 
> > at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”
> 
> > Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists.
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
> 
> > at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)
> 
> > at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > **Modifying the program stage of a Tracker program (i.e. program “with registration”)**
> 
> > - INFO 2016-11-02 16:55:26,050 (admin) Updating 1 object(s) of type ProgramStage (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - INFO 2016-11-02 16:55:26,065 (admin) Updating 2 object(s) of type ProgramStageDataElement (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - **ERROR 2016-11-02 16:55:26,073 Exception occurred while trying to import the metadata. Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 (MetadataSyncImportHandler.java [http-bio-8080-exec-10])**
> 
> > **org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1**
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67)
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54)
> 
> > at org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:46)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3106)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2985)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3365)
> 
> > at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 
> > at java.lang.reflect.Method.invoke(Method.java:498)
> 
> > at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
> 
> > at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> 
> > at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
> 
> > at com.sun.proxy.$Proxy186.commit(Unknown Source)
> 
> > 
> 
> > 
> 
> > Could you please help fix the issues.
> 
> > 
> 
> > 
> 
> > _Cheers,_
> 
> > 
> 
> > Archana Chillala  
> > Application Developer  
> > Email  
> > [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> > Telephone  
> > +91 9100960533  
> > [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> > 
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![Archana\_Chillala](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/a/ce73a5/32.png) [@Archana\_Chillala](https://community.dhis2.org/u/Archana_Chillala)\
**Post date:** [10 November 2016 05:39 UTC](https://community.dhis2.org/t/issue-metadata-import-fails-when-modifying-a-tracker-program-and-tracker-program-stage/33469/5 "2016-11-10T05:39:10Z")

</div>

Hi Morten,

Thanks for the fix. We’re now able to import **Program Stage** of a Tracker program after modifying it.

But, the issue still exists while importing a modified **Tracker program.**

Please find the log trace attached herewith.

_Cheers,_

[Importing\_program\_fails.log](https://dhis2.b-cdn.net/uploads/default/original/3X/5/8/58b7d582f55abd675eba0e51102543f33a8462c9.log) (17 KB)

> **···**
>
> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > This should be fixed in latest 225/master (2.24 was not affected)
> 
> Archana Chillala  
> Application Developer  
> Email  
> [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> Telephone  
> +91 9100960533  
> [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > Hi Archana
> 
> > I’m looking into this now.
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Fri, Nov 4, 2016 at 4:07 PM, Archana Chillala [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com) wrote:
> 
> > Hi,
> 
> > 
> 
> > We are using the latest version of DHIS 2.25 (build - 5e16867). We have two instances of DHIS and are trying to sync metadata from one instance to the other. Sync is failing for the following cases.
> 
> > 
> 
> > 
> 
> > \*\*Modifying a Tracker program (i.e. program “with registration”) \*\*
> 
> > 
> 
> > - INFO 2016-11-02 16:36:27,877 (admin) Creating 1 object(s) of type ProgramTrackedEntityAttribute (DefaultObjectBundleService.java [http-bio-8080-exec-7])
> 
> > - **WARN 2016-11-02 16:36:27,902 SQL Error: 0, SQLState: 23505 (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,903 ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”**
> 
> > **Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists. (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,916 Exception occurred while trying to import the metadata. could not execute statement (MetadataSyncImportHandler.java [http-bio-8080-exec-7])**
> 
> > **org.hibernate.exception.ConstraintViolationException: could not execute statement**
> 
> > at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
> 
> > at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
> 
> > at org.hibernate.engine.jdbc.batc[h.internal.NonBatchingBatch.ad](http://h.internal.NonBatchingBatch.ad)dToBatch(NonBatchingBatch.java:45)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2921)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3421)
> 
> > at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”
> 
> > Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists.
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
> 
> > at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)
> 
> > at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > **Modifying the program stage of a Tracker program (i.e. program “with registration”)**
> 
> > - INFO 2016-11-02 16:55:26,050 (admin) Updating 1 object(s) of type ProgramStage (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - INFO 2016-11-02 16:55:26,065 (admin) Updating 2 object(s) of type ProgramStageDataElement (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - **ERROR 2016-11-02 16:55:26,073 Exception occurred while trying to import the metadata. Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 (MetadataSyncImportHandler.java [http-bio-8080-exec-10])**
> 
> > **org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1**
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67)
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54)
> 
> > at org.hibernate.engine.jdbc.batc[h.internal.NonBatchingBatch.ad](http://h.internal.NonBatchingBatch.ad)dToBatch(NonBatchingBatch.java:46)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3106)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2985)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3365)
> 
> > at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 
> > at java.lang.reflect.Method.invoke(Method.java:498)
> 
> > at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
> 
> > at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> 
> > at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
> 
> > at com.sun.proxy.$Proxy186.commit(Unknown Source)
> 
> > 
> 
> > 
> 
> > Could you please help fix the issues.
> 
> > 
> 
> > 
> 
> > _Cheers,_
> 
> > 
> 
> > Archana Chillala  
> > Application Developer  
> > Email  
> > [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> > Telephone  
> > +91 9100960533  
> > [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> > 
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![morten](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/morten/32/36295_2.png) [@morten](https://community.dhis2.org/u/morten)\
**Post date:** [10 November 2016 05:52 UTC](https://community.dhis2.org/t/issue-metadata-import-fails-when-modifying-a-tracker-program-and-tracker-program-stage/33469/6 "2016-11-10T05:52:17Z")

</div>

Hi Archana

Ok, looking into it now…

> **···**
>
> On Thu, Nov 10, 2016 at 12:39 PM, Archana Chillala [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com) wrote:
> 
> > Hi Morten,
> 
> > 
> 
> > Thanks for the fix. We’re now able to import **Program Stage** of a Tracker program after modifying it.
> 
> > 
> 
> > But, the issue still exists while importing a modified **Tracker program.**
> 
> > 
> 
> > Please find the log trace attached herewith.
> 
> > 
> 
> > 
> 
> > _Cheers,_
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> Archana Chillala  
> Application Developer  
> Email  
> [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> Telephone  
> +91 9100960533  
> [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > This should be fixed in latest 225/master (2.24 was not affected)
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > Hi Archana
> 
> > I’m looking into this now.
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Fri, Nov 4, 2016 at 4:07 PM, Archana Chillala [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com) wrote:
> 
> > Hi,
> 
> > 
> 
> > We are using the latest version of DHIS 2.25 (build - 5e16867). We have two instances of DHIS and are trying to sync metadata from one instance to the other. Sync is failing for the following cases.
> 
> > 
> 
> > 
> 
> > \*\*Modifying a Tracker program (i.e. program “with registration”) \*\*
> 
> > 
> 
> > - INFO 2016-11-02 16:36:27,877 (admin) Creating 1 object(s) of type ProgramTrackedEntityAttribute (DefaultObjectBundleService.java [http-bio-8080-exec-7])
> 
> > - **WARN 2016-11-02 16:36:27,902 SQL Error: 0, SQLState: 23505 (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,903 ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”**
> 
> > **Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists. (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,916 Exception occurred while trying to import the metadata. could not execute statement (MetadataSyncImportHandler.java [http-bio-8080-exec-7])**
> 
> > **org.hibernate.exception.ConstraintViolationException: could not execute statement**
> 
> > at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
> 
> > at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
> 
> > at org.hibernate.engine.jdbc.batc[h.internal.NonBatchingBatch.ad](http://h.internal.NonBatchingBatch.ad)dToBatch(NonBatchingBatch.java:45)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2921)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3421)
> 
> > at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”
> 
> > Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists.
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
> 
> > at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)
> 
> > at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > **Modifying the program stage of a Tracker program (i.e. program “with registration”)**
> 
> > - INFO 2016-11-02 16:55:26,050 (admin) Updating 1 object(s) of type ProgramStage (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - INFO 2016-11-02 16:55:26,065 (admin) Updating 2 object(s) of type ProgramStageDataElement (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - **ERROR 2016-11-02 16:55:26,073 Exception occurred while trying to import the metadata. Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 (MetadataSyncImportHandler.java [http-bio-8080-exec-10])**
> 
> > **org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1**
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67)
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54)
> 
> > at org.hibernate.engine.jdbc.batc[h.internal.NonBatchingBatch.ad](http://h.internal.NonBatchingBatch.ad)dToBatch(NonBatchingBatch.java:46)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3106)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2985)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3365)
> 
> > at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 
> > at java.lang.reflect.Method.invoke(Method.java:498)
> 
> > at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
> 
> > at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> 
> > at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
> 
> > at com.sun.proxy.$Proxy186.commit(Unknown Source)
> 
> > 
> 
> > 
> 
> > Could you please help fix the issues.
> 
> > 
> 
> > 
> 
> > _Cheers,_
> 
> > 
> 
> > Archana Chillala  
> > Application Developer  
> > Email  
> > [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> > Telephone  
> > +91 9100960533  
> > [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> > 
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![morten](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/morten/32/36295_2.png) [@morten](https://community.dhis2.org/u/morten)\
**Post date:** [10 November 2016 06:17 UTC](https://community.dhis2.org/t/issue-metadata-import-fails-when-modifying-a-tracker-program-and-tracker-program-stage/33469/7 "2016-11-10T06:17:08Z")

</div>

Hi Archana

I’m not able to reproduce this issue. Could you provide a bit more info? steps to reproduce.

> **···**
>
> On Thu, Nov 10, 2016 at 12:52 PM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > Hi Archana
> 
> > Ok, looking into it now…
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Thu, Nov 10, 2016 at 12:39 PM, Archana Chillala [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com) wrote:
> 
> > Hi Morten,
> 
> > 
> 
> > Thanks for the fix. We’re now able to import **Program Stage** of a Tracker program after modifying it.
> 
> > 
> 
> > But, the issue still exists while importing a modified **Tracker program.**
> 
> > 
> 
> > Please find the log trace attached herewith.
> 
> > 
> 
> > 
> 
> > _Cheers,_
> 
> Archana Chillala  
> Application Developer  
> Email  
> [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> Telephone  
> +91 9100960533  
> [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > This should be fixed in latest 225/master (2.24 was not affected)
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > Hi Archana
> 
> > I’m looking into this now.
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Fri, Nov 4, 2016 at 4:07 PM, Archana Chillala [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com) wrote:
> 
> > Hi,
> 
> > 
> 
> > We are using the latest version of DHIS 2.25 (build - 5e16867). We have two instances of DHIS and are trying to sync metadata from one instance to the other. Sync is failing for the following cases.
> 
> > 
> 
> > 
> 
> > \*\*Modifying a Tracker program (i.e. program “with registration”) \*\*
> 
> > 
> 
> > - INFO 2016-11-02 16:36:27,877 (admin) Creating 1 object(s) of type ProgramTrackedEntityAttribute (DefaultObjectBundleService.java [http-bio-8080-exec-7])
> 
> > - **WARN 2016-11-02 16:36:27,902 SQL Error: 0, SQLState: 23505 (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,903 ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”**
> 
> > **Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists. (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,916 Exception occurred while trying to import the metadata. could not execute statement (MetadataSyncImportHandler.java [http-bio-8080-exec-7])**
> 
> > **org.hibernate.exception.ConstraintViolationException: could not execute statement**
> 
> > at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
> 
> > at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
> 
> > at org.hibernate.engine.jdbc.batc[h.internal.NonBatchingBatch.ad](http://h.internal.NonBatchingBatch.ad)dToBatch(NonBatchingBatch.java:45)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2921)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3421)
> 
> > at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”
> 
> > Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists.
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
> 
> > at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)
> 
> > at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > **Modifying the program stage of a Tracker program (i.e. program “with registration”)**
> 
> > - INFO 2016-11-02 16:55:26,050 (admin) Updating 1 object(s) of type ProgramStage (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - INFO 2016-11-02 16:55:26,065 (admin) Updating 2 object(s) of type ProgramStageDataElement (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - **ERROR 2016-11-02 16:55:26,073 Exception occurred while trying to import the metadata. Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 (MetadataSyncImportHandler.java [http-bio-8080-exec-10])**
> 
> > **org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1**
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67)
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54)
> 
> > at org.hibernate.engine.jdbc.batc[h.internal.NonBatchingBatch.ad](http://h.internal.NonBatchingBatch.ad)dToBatch(NonBatchingBatch.java:46)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3106)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2985)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3365)
> 
> > at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 
> > at java.lang.reflect.Method.invoke(Method.java:498)
> 
> > at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
> 
> > at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> 
> > at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
> 
> > at com.sun.proxy.$Proxy186.commit(Unknown Source)
> 
> > 
> 
> > 
> 
> > Could you please help fix the issues.
> 
> > 
> 
> > 
> 
> > _Cheers,_
> 
> > 
> 
> > Archana Chillala  
> > Application Developer  
> > Email  
> > [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> > Telephone  
> > +91 9100960533  
> > [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> > 
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![Archana\_Chillala](https://dhis2.b-cdn.net/letter_avatar_proxy/v4/letter/a/ce73a5/32.png) [@Archana\_Chillala](https://community.dhis2.org/u/Archana_Chillala)\
**Post date:** [10 November 2016 09:40 UTC](https://community.dhis2.org/t/issue-metadata-import-fails-when-modifying-a-tracker-program-and-tracker-program-stage/33469/8 "2016-11-10T09:40:46Z")

</div>

Hi Morten,

Here are the steps to reproduce:

1. Create a program “with registration”.

2. Create a program Stage within it.

3. Export and Import this metadata into another instance.

4. Import is successful

5. Now, modify some property of the Program in the first instance (e.g: name, description etc)

6. Export and Import (i.e Sync metadata)

7. Import Fails with the error mentioned in the logs attached in previous mail.

P.S. We’re using DHIS version 2.25 build 1ce40ae.

_Cheers,_

> **···**
>
> Archana Chillala  
> Application Developer  
> Email  
> [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> Telephone  
> +91 9100960533  
> [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> On Thu, Nov 10, 2016 at 11:47 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > Hi Archana
> 
> > I’m not able to reproduce this issue. Could you provide a bit more info? steps to reproduce.
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Thu, Nov 10, 2016 at 12:52 PM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > Hi Archana
> 
> > Ok, looking into it now…
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Thu, Nov 10, 2016 at 12:39 PM, Archana Chillala [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com) wrote:
> 
> > Hi Morten,
> 
> > 
> 
> > Thanks for the fix. We’re now able to import **Program Stage** of a Tracker program after modifying it.
> 
> > 
> 
> > But, the issue still exists while importing a modified **Tracker program.**
> 
> > 
> 
> > Please find the log trace attached herewith.
> 
> > 
> 
> > 
> 
> > _Cheers,_
> 
> Archana Chillala  
> Application Developer  
> Email  
> [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> Telephone  
> +91 9100960533  
> [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > This should be fixed in latest 225/master (2.24 was not affected)
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > Hi Archana
> 
> > I’m looking into this now.
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Fri, Nov 4, 2016 at 4:07 PM, Archana Chillala [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com) wrote:
> 
> > Hi,
> 
> > 
> 
> > We are using the latest version of DHIS 2.25 (build - 5e16867). We have two instances of DHIS and are trying to sync metadata from one instance to the other. Sync is failing for the following cases.
> 
> > 
> 
> > 
> 
> > \*\*Modifying a Tracker program (i.e. program “with registration”) \*\*
> 
> > 
> 
> > - INFO 2016-11-02 16:36:27,877 (admin) Creating 1 object(s) of type ProgramTrackedEntityAttribute (DefaultObjectBundleService.java [http-bio-8080-exec-7])
> 
> > - **WARN 2016-11-02 16:36:27,902 SQL Error: 0, SQLState: 23505 (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,903 ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”**
> 
> > **Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists. (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,916 Exception occurred while trying to import the metadata. could not execute statement (MetadataSyncImportHandler.java [http-bio-8080-exec-7])**
> 
> > **org.hibernate.exception.ConstraintViolationException: could not execute statement**
> 
> > at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
> 
> > at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
> 
> > at org.hibernate.engine.jdbc.batc[h.internal.NonBatchingBatch.ad](http://h.internal.NonBatchingBatch.ad)dToBatch(NonBatchingBatch.java:45)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2921)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3421)
> 
> > at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”
> 
> > Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists.
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
> 
> > at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)
> 
> > at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > **Modifying the program stage of a Tracker program (i.e. program “with registration”)**
> 
> > - INFO 2016-11-02 16:55:26,050 (admin) Updating 1 object(s) of type ProgramStage (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - INFO 2016-11-02 16:55:26,065 (admin) Updating 2 object(s) of type ProgramStageDataElement (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - **ERROR 2016-11-02 16:55:26,073 Exception occurred while trying to import the metadata. Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 (MetadataSyncImportHandler.java [http-bio-8080-exec-10])**
> 
> > **org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1**
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67)
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54)
> 
> > at org.hibernate.engine.jdbc.batc[h.internal.NonBatchingBatch.ad](http://h.internal.NonBatchingBatch.ad)dToBatch(NonBatchingBatch.java:46)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3106)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2985)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3365)
> 
> > at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 
> > at java.lang.reflect.Method.invoke(Method.java:498)
> 
> > at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
> 
> > at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> 
> > at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
> 
> > at com.sun.proxy.$Proxy186.commit(Unknown Source)
> 
> > 
> 
> > 
> 
> > Could you please help fix the issues.
> 
> > 
> 
> > 
> 
> > _Cheers,_
> 
> > 
> 
> > Archana Chillala  
> > Application Developer  
> > Email  
> > [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> > Telephone  
> > +91 9100960533  
> > [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> > 
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)

---

<div class="post-metadata">

**Author:** ![morten](https://dhis2.b-cdn.net/user_avatar/community.dhis2.org/morten/32/36295_2.png) [@morten](https://community.dhis2.org/u/morten)\
**Post date:** [10 November 2016 10:02 UTC](https://community.dhis2.org/t/issue-metadata-import-fails-when-modifying-a-tracker-program-and-tracker-program-stage/33469/9 "2016-11-10T10:02:48Z")

</div>

Hm ok, that’s basically what I did… but I will test again tomorrow

> **···**
>
> On Thu, Nov 10, 2016 at 4:40 PM, Archana Chillala [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com) wrote:
> 
> > Hi Morten,
> 
> > 
> 
> > Here are the steps to reproduce:
> 
> > 1. Create a program “with registration”.
> 
> > 1. Create a program Stage within it.
> 
> > 1. Export and Import this metadata into another instance.
> 
> > 1. Import is successful
> 
> > 1. Now, modify some property of the Program in the first instance (e.g: name, description etc)
> 
> > 1. Export and Import (i.e Sync metadata)
> 
> > 1. Import Fails with the error mentioned in the logs attached in previous mail.
> 
> > 
> 
> > P.S. We’re using DHIS version 2.25 build 1ce40ae.
> 
> > 
> 
> > 
> 
> > 
> 
> > _Cheers,_
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> Archana Chillala  
> Application Developer  
> Email  
> [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> Telephone  
> +91 9100960533  
> [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> On Thu, Nov 10, 2016 at 11:47 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > Hi Archana
> 
> > I’m not able to reproduce this issue. Could you provide a bit more info? steps to reproduce.
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Thu, Nov 10, 2016 at 12:52 PM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > Hi Archana
> 
> > Ok, looking into it now…
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Thu, Nov 10, 2016 at 12:39 PM, Archana Chillala [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com) wrote:
> 
> > Hi Morten,
> 
> > 
> 
> > Thanks for the fix. We’re now able to import **Program Stage** of a Tracker program after modifying it.
> 
> > 
> 
> > But, the issue still exists while importing a modified **Tracker program.**
> 
> > 
> 
> > Please find the log trace attached herewith.
> 
> > 
> 
> > 
> 
> > _Cheers,_
> 
> Archana Chillala  
> Application Developer  
> Email  
> [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> Telephone  
> +91 9100960533  
> [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > This should be fixed in latest 225/master (2.24 was not affected)
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Wed, Nov 9, 2016 at 10:14 AM, Morten Olav Hansen [morten@dhis2.org](mailto:morten@dhis2.org) wrote:
> 
> > Hi Archana
> 
> > I’m looking into this now.
> 
> –
> 
> Morten Olav Hansen
> 
> Senior Engineer, DHIS 2
> 
> University of Oslo
> 
> [http://www.dhis2.org](http://www.dhis2.org)
> 
> On Fri, Nov 4, 2016 at 4:07 PM, Archana Chillala [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com) wrote:
> 
> > Hi,
> 
> > 
> 
> > We are using the latest version of DHIS 2.25 (build - 5e16867). We have two instances of DHIS and are trying to sync metadata from one instance to the other. Sync is failing for the following cases.
> 
> > 
> 
> > 
> 
> > \*\*Modifying a Tracker program (i.e. program “with registration”) \*\*
> 
> > 
> 
> > - INFO 2016-11-02 16:36:27,877 (admin) Creating 1 object(s) of type ProgramTrackedEntityAttribute (DefaultObjectBundleService.java [http-bio-8080-exec-7])
> 
> > - **WARN 2016-11-02 16:36:27,902 SQL Error: 0, SQLState: 23505 (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,903 ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”**
> 
> > **Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists. (SqlExceptionHelper.java [http-bio-8080-exec-7])**
> 
> > **\* ERROR 2016-11-02 16:36:27,916 Exception occurred while trying to import the metadata. could not execute statement (MetadataSyncImportHandler.java [http-bio-8080-exec-7])**
> 
> > **org.hibernate.exception.ConstraintViolationException: could not execute statement**
> 
> > at org.hibernate.exception.internal.SQLStateConversionDelegate.convert(SQLStateConversionDelegate.java:112)
> 
> > at org.hibernate.exception.internal.StandardSQLExceptionConverter.convert(StandardSQLExceptionConverter.java:42)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:111)
> 
> > at org.hibernate.engine.jdbc.spi.SqlExceptionHelper.convert(SqlExceptionHelper.java:97)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:207)
> 
> > at org.hibernate.engine.jdbc.batc[h.internal.NonBatchingBatch.ad](http://h.internal.NonBatchingBatch.ad)dToBatch(NonBatchingBatch.java:45)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:2921)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3421)
> 
> > at org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:89)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > Caused by: org.postgresql.util.PSQLException: ERROR: duplicate key value violates unique constraint “programtrackedentityattribute\_unique\_key”
> 
> > Detail: Key (programid, trackedentityattributeid)=(80, 74) already exists.
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2284)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:2003)
> 
> > at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:200)
> 
> > at org.postgresql.jdbc.PgStatement.execute(PgStatement.java:424)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeWithFlags(PgPreparedStatement.java:161)
> 
> > at org.postgresql.jdbc.PgPreparedStatement.executeUpdate(PgPreparedStatement.java:133)
> 
> > at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
> 
> > at org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:204)
> 
> > 
> 
> > 
> 
> > 
> 
> > 
> 
> > **Modifying the program stage of a Tracker program (i.e. program “with registration”)**
> 
> > - INFO 2016-11-02 16:55:26,050 (admin) Updating 1 object(s) of type ProgramStage (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - INFO 2016-11-02 16:55:26,065 (admin) Updating 2 object(s) of type ProgramStageDataElement (DefaultObjectBundleService.java [http-bio-8080-exec-10])
> 
> > - **ERROR 2016-11-02 16:55:26,073 Exception occurred while trying to import the metadata. Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1 (MetadataSyncImportHandler.java [http-bio-8080-exec-10])**
> 
> > **org.hibernate.StaleStateException: Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1**
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.checkBatched(Expectations.java:67)
> 
> > at org.hibernate.jdbc.Expectations$BasicExpectation.verifyOutcome(Expectations.java:54)
> 
> > at org.hibernate.engine.jdbc.batc[h.internal.NonBatchingBatch.ad](http://h.internal.NonBatchingBatch.ad)dToBatch(NonBatchingBatch.java:46)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3106)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:2985)
> 
> > at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3365)
> 
> > at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:145)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:560)
> 
> > at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:434)
> 
> > at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:337)
> 
> > at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:39)
> 
> > at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1295)
> 
> > at org.hisp.dhis.dxf2.metadata.objectbundle.DefaultObjectBundleService.commit(DefaultObjectBundleService.java:160)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 
> > at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 
> > at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 
> > at java.lang.reflect.Method.invoke(Method.java:498)
> 
> > at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:302)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:190)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:157)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor$1.proceedWithInvocation(TransactionInterceptor.java:99)
> 
> > at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:281)
> 
> > at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:96)
> 
> > at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
> 
> > at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:208)
> 
> > at com.sun.proxy.$Proxy186.commit(Unknown Source)
> 
> > 
> 
> > 
> 
> > Could you please help fix the issues.
> 
> > 
> 
> > 
> 
> > _Cheers,_
> 
> > 
> 
> > Archana Chillala  
> > Application Developer  
> > Email  
> > [archanac@thoughtworks.com](mailto:archanac@thoughtworks.com)  
> > Telephone  
> > +91 9100960533  
> > [![ThoughtWorks](https://dhis2.b-cdn.net/uploads/default/original/3X/1/3/139c0e16b7a810c6967a26944510781313bbfbfa.png)](http://www.thoughtworks.com/?utm_campaign=archana-chillala-signature&utm_medium=email&utm_source=thoughtworks-email-signature-generator)
> 
> > 
> 
> > * * *
> > 
> > Mailing list: [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > Post to : [dhis2-devs@lists.launchpad.net](mailto:dhis2-devs@lists.launchpad.net)
> > 
> > Unsubscribe : [https://launchpad.net/~dhis2-devs](https://launchpad.net/~dhis2-devs)
> > 
> > More help : [https://help.launchpad.net/ListHelp](https://help.launchpad.net/ListHelp)
