← Back to team overview

dhis2-devs team mailing list archive

Re: [Bug 1544528] Re: DataSet PUT request fails with 500 error

 

Great! Thanks Morten!

On Fri, Feb 12, 2016 at 12:40 AM, Morten Olav Hansen <
1544528@xxxxxxxxxxxxxxxxxx> wrote:

> This have now been fixed in 2.22 and trunk. Please remember that
> DataEntryForm is a normal id object now, which means it -must- be
> created prior to saving the data set.
>
> ** Changed in: dhis2
>        Status: Confirmed => Fix Released
>
> --
> 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:
>   Fix Released
>
> 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
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>

References