← Back to team overview

dhis2-devs team mailing list archive

Re: PATCH HTTP 500 error

 

Thanks Morten,

Good to hear that PATCH is getting a facelift in 2.23/2.24. We ended up
doing a full update on the object with the preheatcache set to FALSE (saved
a lot of time).

Question about the dataEntryForm, are you saying that these are now
completely separate objects to dataSet? As in, the dataSet will reference a
dataEntryForm just like it would reference a categoryCombo?




*Timothy Harding*
Sr. Systems Analyst, BAO Systems
+1 202-536-1541 | tharding@xxxxxxxxxxxxxx | http://www.baosystems.com | Skype:
hardingt@xxxxxxxxx | 2900 K Street, Suite 404, Washington D.C. 20007

On Wed, Mar 23, 2016 at 11:11 PM, Morten Olav Hansen <morten@xxxxxxxxx>
wrote:

> Hi
>
> I think you might have to do a full update of the object. PATCH
> functionality is a bit flaky at the moment, and really only works with
> simple properties (strings, numbers etc).
>
> I'm currently building a new importer for 2.23/2.24 and I'm hoping to have
> a much more robust PATCH functionality there (probably for 2.24)
>
> Please also note that this object changed in going from 2.21 to 2.22, and
> data entry forms are now what we call an id object, which means it needs to
> be referenced instead, and we have a endpoint called /api/dataEntryForms
> for it
>
> --
> Morten Olav Hansen
> Senior Engineer, DHIS 2
> University of Oslo
> http://www.dhis2.org
>
> On Wed, Mar 23, 2016 at 8:58 PM, Timothy Harding <tharding@xxxxxxxxxxxxxx>
> wrote:
>
>> Forgot to post the server version:
>>
>> Version:2.21Build revision:21048
>>
>>
>> *Timothy Harding*
>> Sr. Systems Analyst, BAO Systems
>> +1 202-536-1541 | tharding@xxxxxxxxxxxxxx | http://www.baosystems.com | Skype:
>> hardingt@xxxxxxxxx | 2900 K Street, Suite 404, Washington D.C. 20007
>>
>> On Wed, Mar 23, 2016 at 9:53 AM, Timothy Harding <tharding@xxxxxxxxxxxxxx
>> > wrote:
>>
>>> Hello dhis2-devs
>>>
>>> I'm trying to make use of the PATCH functionality to simplify a
>>> deployment and it looks to get all but finished, and then barfs the
>>> following error:
>>>
>>> HTTP Status 500 - Request processing failed; nested exception is
>>> org.hibernate.HibernateException: identifier of an instance of
>>> org.hisp.dhis.dataentryform.DataEntryForm was altered from 2212129 to 0
>>>
>>> The command I'm running is the following (I've obfuscated certain
>>> elements)
>>>
>>> curl -X PATCH -d @patch.xml -H "Content-Type: application/xml" -u
>>> tharding@xxxxxxxxxxxxxx:myPass "
>>> http://localhost:8080/dhis/api/dataSets/a1234567890";
>>>
>>> The file structure of the file is the following
>>>
>>> [image: Inline image 1]
>>>
>>> The log file says the following:
>>> * INFO  2016-03-23 06:39:53,646 'tharding@xxxxxxxxxxxxxx' update
>>> org.hisp.dhis.dataset.DataSet, name: MyDataset, uid: a1234567890
>>> (AuditLogUtil.java [http-bio-8080-exec-10])
>>>
>>> The full error is attached.
>>>
>>>
>>>
>>> *Timothy Harding*
>>> Sr. Systems Analyst, BAO Systems
>>> +1 202-536-1541 | tharding@xxxxxxxxxxxxxx | http://www.baosystems.com | Skype:
>>> hardingt@xxxxxxxxx | 2900 K Street, Suite 404, Washington D.C. 20007
>>>
>>
>>
>> _______________________________________________
>> 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
>>
>>
>

PNG image

PNG image


Follow ups

References