I am having the same issue, the catalina.out log does not report the error shown on the browser’s console. I could not figure out how to ask DHIS2 to do a more verbose logging, something like log.level=debug. Is that possible?
I activated statement logging on Postgres, and tested the error on the command line to get the queries:
~# curl -u admin:district -v -H “Content-Type: application/json” -d @datos.json -X PUT http://18.104.22.168:8080/dhis/api/events/[program_stageID]/[data_elementID]
I tested two data elements IDs, the first returned StatusCode 200 (ok) and another that returned StatusCode 409 (conflict).
In both cases, Postgres logged the same queries (16 Select and 3 Update statements).
I then executed all those queries manually and received results every time -no empty sets. Furthermore, The update queries did run without a problem since they do not include the data element ID.
I did noticed that one of the Select statements is getting ALL the dataelements from the given TEI - not only for the specified program stage. It is as though some how the application is using this list of data elements to try to do the update, and obviously not finding many of them on the current stage. Here is the Query:
de.uid AS de_uid,
de.code AS de_code,
FROM programstagedataelement psde
JOIN dataelement de
ON psde.dataelementid = de.dataelementid
ORDER BY psde.programstageid;
FROM trackedentityinstance tei
WHERE tei.uid IN (‘TEI_ID’);
Given that the error is only being logged on the browser’s console; makes think this might be caused by the jQuery code, without the server knowing about it. I already cleared cache, cookies and app local storage in the browser, error continues to appear.
Thank you for comments.