Error when updating data set expiry days

Hi Devs,

When updating expiry days in a data set, I am seeing this error. Any idea how to correct it? I am not able to reproduce on the demo site, so seems something specific to this database.

Regards,

Jason

Version:2.26
Build revision:80d7658

Build date:2017-06-15 06:43

  • INFO 2017-07-02 12:18:25,811 (admin) Import:Start (DefaultMetadataImportService.java [http-bio-0.0.0.0-8080-exec-23])

  • INFO 2017-07-02 12:18:26,716 (admin) Import:Preheat[REFERENCE] took 0.90 seconds (DefaultPreheatService.java [http-bio-0.0.0.0-8080-exec-23])

  • INFO 2017-07-02 12:18:26,721 (admin) Import:Validation took 0.00 seconds (DefaultObjectBundleValidationService.java [http-bio-0.0.0.0-8080-exec-23])

  • INFO 2017-07-02 12:18:26,722 (admin) Updating 1 object(s) of type DataSet (DefaultObjectBundleService.java [http-bio-0.0.0.0-8080-exec-23])

  • WARN 2017-07-02 12:18:26,870 SQL Error: 0, SQLState: 23503 (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])

  • ERROR 2017-07-02 12:18:26,871 ERROR: update or delete on table “dataelementoperand” violates foreign key constraint “fk_datadimensionitem_dataelementoperandid” on table “datadimensionitem”

Detail: Key (dataelementoperandid)=(788048) is still referenced from table “datadimensionitem”. (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])

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.delete(AbstractEntityPersister.java:3259)

at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3496)

at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:98)

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

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


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Hi Jason
I’ve seen this before when there is a favorite using details with a data element included in the data set.

JM

···

On 2 Jul 2017 13:33, “Jason Pickering” jason.p.pickering@gmail.com wrote:

Hi Devs,

When updating expiry days in a data set, I am seeing this error. Any idea how to correct it? I am not able to reproduce on the demo site, so seems something specific to this database.

Regards,

Jason

Version:2.26
Build revision:80d7658

Build date:2017-06-15 06:43

  • INFO 2017-07-02 12:18:25,811 (admin) Import:Start (DefaultMetadataImportService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,716 (admin) Import:Preheat[REFERENCE] took 0.90 seconds (DefaultPreheatService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,721 (admin) Import:Validation took 0.00 seconds (DefaultObjectBundleValidationService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,722 (admin) Updating 1 object(s) of type DataSet (DefaultObjectBundleService.java [http-bio-0.0.0.0-8080-exec-23])
  • WARN 2017-07-02 12:18:26,870 SQL Error: 0, SQLState: 23503 (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])
  • ERROR 2017-07-02 12:18:26,871 ERROR: update or delete on table “dataelementoperand” violates foreign key constraint “fk_datadimensionitem_dataelementoperandid” on table “datadimensionitem”

Detail: Key (dataelementoperandid)=(788048) is still referenced from table “datadimensionitem”. (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])

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.delete(AbstractEntityPersister.java:3259)

at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3496)

at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:98)

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

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


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi JM,

Thanks for confirming that others have seen this. This is a really crippling problem for this instance and I can confirm that there is a favorite attached to this data dimension.

I do have a work around to PATCH the expiry days with the API, which works, but that is a less than ideal solution.

Regards,

Jason

···

On Sun, Jul 2, 2017 at 8:29 AM, JM Alcantara jmalcantara1@gmail.com wrote:

Hi Jason
I’ve seen this before when there is a favorite using details with a data element included in the data set.

JM

On 2 Jul 2017 13:33, “Jason Pickering” jason.p.pickering@gmail.com wrote:

Hi Devs,

When updating expiry days in a data set, I am seeing this error. Any idea how to correct it? I am not able to reproduce on the demo site, so seems something specific to this database.

Regards,

Jason

Version:2.26
Build revision:80d7658

Build date:2017-06-15 06:43

  • INFO 2017-07-02 12:18:25,811 (admin) Import:Start (DefaultMetadataImportService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,716 (admin) Import:Preheat[REFERENCE] took 0.90 seconds (DefaultPreheatService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,721 (admin) Import:Validation took 0.00 seconds (DefaultObjectBundleValidationService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,722 (admin) Updating 1 object(s) of type DataSet (DefaultObjectBundleService.java [http-bio-0.0.0.0-8080-exec-23])
  • WARN 2017-07-02 12:18:26,870 SQL Error: 0, SQLState: 23503 (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])
  • ERROR 2017-07-02 12:18:26,871 ERROR: update or delete on table “dataelementoperand” violates foreign key constraint “fk_datadimensionitem_dataelementoperandid” on table “datadimensionitem”

Detail: Key (dataelementoperandid)=(788048) is still referenced from table “datadimensionitem”. (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])

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.delete(AbstractEntityPersister.java:3259)

at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3496)

at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:98)

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

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


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

It seems this also affects the setup of grey fields in sections.

Regards,

JM

···

On Sun, Jul 2, 2017 at 8:29 AM, JM Alcantara jmalcantara1@gmail.com wrote:

Hi Jason
I’ve seen this before when there is a favorite using details with a data element included in the data set.

JM

On 2 Jul 2017 13:33, “Jason Pickering” jason.p.pickering@gmail.com wrote:

Hi Devs,

When updating expiry days in a data set, I am seeing this error. Any idea how to correct it? I am not able to reproduce on the demo site, so seems something specific to this database.

Regards,

Jason

Version:2.26
Build revision:80d7658

Build date:2017-06-15 06:43

  • INFO 2017-07-02 12:18:25,811 (admin) Import:Start (DefaultMetadataImportService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,716 (admin) Import:Preheat[REFERENCE] took 0.90 seconds (DefaultPreheatService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,721 (admin) Import:Validation took 0.00 seconds (DefaultObjectBundleValidationService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,722 (admin) Updating 1 object(s) of type DataSet (DefaultObjectBundleService.java [http-bio-0.0.0.0-8080-exec-23])
  • WARN 2017-07-02 12:18:26,870 SQL Error: 0, SQLState: 23503 (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])
  • ERROR 2017-07-02 12:18:26,871 ERROR: update or delete on table “dataelementoperand” violates foreign key constraint “fk_datadimensionitem_dataelementoperandid” on table “datadimensionitem”

Detail: Key (dataelementoperandid)=(788048) is still referenced from table “datadimensionitem”. (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])

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.delete(AbstractEntityPersister.java:3259)

at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3496)

at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:98)

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

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


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

Hi Jason

Did you create a issue for this?

···

On Mon, Jul 3, 2017 at 9:25 PM, JM Alcantara jmalcantara1@gmail.com wrote:

It seems this also affects the setup of grey fields in sections.

Regards,

JM

El 03/07/2017, a las 16:16, Jason Pickering jason.p.pickering@gmail.com escribió:

Hi JM,

Thanks for confirming that others have seen this. This is a really crippling problem for this instance and I can confirm that there is a favorite attached to this data dimension.

I do have a work around to PATCH the expiry days with the API, which works, but that is a less than ideal solution.

Regards,

Jason


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Sun, Jul 2, 2017 at 8:29 AM, JM Alcantara jmalcantara1@gmail.com wrote:

Hi Jason
I’ve seen this before when there is a favorite using details with a data element included in the data set.

JM


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

On 2 Jul 2017 13:33, “Jason Pickering” jason.p.pickering@gmail.com wrote:

Hi Devs,

When updating expiry days in a data set, I am seeing this error. Any idea how to correct it? I am not able to reproduce on the demo site, so seems something specific to this database.

Regards,

Jason

Version:2.26
Build revision:80d7658

Build date:2017-06-15 06:43

  • INFO 2017-07-02 12:18:25,811 (admin) Import:Start (DefaultMetadataImportService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,716 (admin) Import:Preheat[REFERENCE] took 0.90 seconds (DefaultPreheatService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,721 (admin) Import:Validation took 0.00 seconds (DefaultObjectBundleValidationService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,722 (admin) Updating 1 object(s) of type DataSet (DefaultObjectBundleService.java [http-bio-0.0.0.0-8080-exec-23])
  • WARN 2017-07-02 12:18:26,870 SQL Error: 0, SQLState: 23503 (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])
  • ERROR 2017-07-02 12:18:26,871 ERROR: update or delete on table “dataelementoperand” violates foreign key constraint “fk_datadimensionitem_dataelementoperandid” on table “datadimensionitem”

Detail: Key (dataelementoperandid)=(788048) is still referenced from table “datadimensionitem”. (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])

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.delete(AbstractEntityPersister.java:3259)

at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3496)

at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:98)

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

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


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Hi Morten,
Now I did. :slight_smile:

https://jira.dhis2.org/browse/DHIS2-1903

Regards,

Jason

···

On Tue, Jul 4, 2017 at 8:58 PM, Morten Olav Hansen morten@dhis2.org wrote:

Hi Jason

Did you create a issue for this?

Morten Olav Hansen

Senior Engineer, DHIS 2

University of Oslo

http://www.dhis2.org

On Mon, Jul 3, 2017 at 9:25 PM, JM Alcantara jmalcantara1@gmail.com wrote:

It seems this also affects the setup of grey fields in sections.

Regards,

JM

El 03/07/2017, a las 16:16, Jason Pickering jason.p.pickering@gmail.com escribió:

Hi JM,

Thanks for confirming that others have seen this. This is a really crippling problem for this instance and I can confirm that there is a favorite attached to this data dimension.

I do have a work around to PATCH the expiry days with the API, which works, but that is a less than ideal solution.

Regards,

Jason


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

On Sun, Jul 2, 2017 at 8:29 AM, JM Alcantara jmalcantara1@gmail.com wrote:

Hi Jason
I’ve seen this before when there is a favorite using details with a data element included in the data set.

JM


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049

On 2 Jul 2017 13:33, “Jason Pickering” jason.p.pickering@gmail.com wrote:

Hi Devs,

When updating expiry days in a data set, I am seeing this error. Any idea how to correct it? I am not able to reproduce on the demo site, so seems something specific to this database.

Regards,

Jason

Version:2.26
Build revision:80d7658

Build date:2017-06-15 06:43

  • INFO 2017-07-02 12:18:25,811 (admin) Import:Start (DefaultMetadataImportService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,716 (admin) Import:Preheat[REFERENCE] took 0.90 seconds (DefaultPreheatService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,721 (admin) Import:Validation took 0.00 seconds (DefaultObjectBundleValidationService.java [http-bio-0.0.0.0-8080-exec-23])
  • INFO 2017-07-02 12:18:26,722 (admin) Updating 1 object(s) of type DataSet (DefaultObjectBundleService.java [http-bio-0.0.0.0-8080-exec-23])
  • WARN 2017-07-02 12:18:26,870 SQL Error: 0, SQLState: 23503 (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])
  • ERROR 2017-07-02 12:18:26,871 ERROR: update or delete on table “dataelementoperand” violates foreign key constraint “fk_datadimensionitem_dataelementoperandid” on table “datadimensionitem”

Detail: Key (dataelementoperandid)=(788048) is still referenced from table “datadimensionitem”. (SqlExceptionHelper.java [http-bio-0.0.0.0-8080-exec-23])

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.delete(AbstractEntityPersister.java:3259)

at org.hibernate.persister.entity.AbstractEntityPersister.delete(AbstractEntityPersister.java:3496)

at org.hibernate.action.internal.EntityDeleteAction.execute(EntityDeleteAction.java:98)

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

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


Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049


Mailing list: https://launchpad.net/~dhis2-devs

Post to : dhis2-devs@lists.launchpad.net

Unsubscribe : https://launchpad.net/~dhis2-devs

More help : https://help.launchpad.net/ListHelp

Jason P. Pickering
email: jason.p.pickering@gmail.com
tel:+46764147049