dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43206
[Bug 1544528] [NEW] DataSet PUT request fails with 500 error
Public bug reported:
When trying to update a dataset through the API the request fails with a
500 error. (Additionally the request takes quite a long time, about 18
seconds on the demo)
To reproduce:
GET Request
http://play.dhis2.org/dev/api/dataSets/lyLU2wR22tC.json?fields=:owner
Either change or don't change one of the properties
Send a PUT request using the same structure back to the server
When changing the `name` propery the request fails with:
org.postgresql.util.PSQLException: ERROR: null value in column "name" violates not-null constraint
Detail: Failing row contains (424442, null, null, null, 2, rV5Un1vizeD, null, 2016-02-11 12:10:18.122, 2016-02-11 12:10:18.122).
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:186)
org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:59)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3079)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3521)
org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:88)
org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395)
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387)
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:303)
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349)
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1195)
** Affects: dhis2
Importance: Undecided
Status: New
** Tags: api
** Tags added: api
--
You received this bug notification because you are a member of DHIS 2
developers, which is subscribed to DHIS.
https://bugs.launchpad.net/bugs/1544528
Title:
DataSet PUT request fails with 500 error
Status in DHIS:
New
Bug description:
When trying to update a dataset through the API the request fails with
a 500 error. (Additionally the request takes quite a long time, about
18 seconds on the demo)
To reproduce:
GET Request
http://play.dhis2.org/dev/api/dataSets/lyLU2wR22tC.json?fields=:owner
Either change or don't change one of the properties
Send a PUT request using the same structure back to the server
When changing the `name` propery the request fails with:
org.postgresql.util.PSQLException: ERROR: null value in column "name" violates not-null constraint
Detail: Failing row contains (424442, null, null, null, 2, rV5Un1vizeD, null, 2016-02-11 12:10:18.122, 2016-02-11 12:10:18.122).
org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2198)
org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1927)
org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:561)
org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:419)
org.postgresql.jdbc2.AbstractJdbc2Statement.executeUpdate(AbstractJdbc2Statement.java:365)
com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:105)
org.hibernate.engine.jdbc.internal.ResultSetReturnImpl.executeUpdate(ResultSetReturnImpl.java:186)
org.hibernate.engine.jdbc.batch.internal.NonBatchingBatch.addToBatch(NonBatchingBatch.java:59)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3079)
org.hibernate.persister.entity.AbstractEntityPersister.insert(AbstractEntityPersister.java:3521)
org.hibernate.action.internal.EntityInsertAction.execute(EntityInsertAction.java:88)
org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:395)
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:387)
org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:303)
org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:349)
org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:56)
org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1195)
To manage notifications about this bug go to:
https://bugs.launchpad.net/dhis2/+bug/1544528/+subscriptions
Follow ups