500 error when Importing ADX data

Hi all,
When I’m trying to post the following ADX payload using the DHIS2 API (/api/dataValueSets?idScheme=CODE) it throws a 500 error. Could someone help me to fix it?

Request payload (dummy data):

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<adx exported="2020-09-23T10:42:08.446Z"
	xmlns="urn:ihe:qrph:adx:2015">
	<group dataSet="DS_COVID_19" period="2020-08-01/P1M" orgUnit="OU_Nalanda">
		<dataValue dataElement="DE_covid_19_patients" value="204" GENDER="FEMALE" AGE="AGE_20_30"/>
		<dataValue dataElement="DE_covid_19_patients" value="204" GENDER="FEMALE" AGE="AGE_LT_20"/>
		<dataValue dataElement="DE_covid_19_patients" value="97" GENDER="MALE" AGE="AGE_LT_20"/>
		<dataValue dataElement="DE_covid_19_patients" value="204" GENDER="FEMALE" AGE="AGE_GT_30"/>
		<dataValue dataElement="DE_covid_19_patients" value="97" GENDER="MALE" AGE="AGE_20_30"/>
		<dataValue dataElement="DE_covid_19_patients" value="97" GENDER="MALE" AGE="AGE_GT_30"/>
	</group>
</adx>

Stack trace:
https://pastebin.pl/view/ec37f6e2

ERROR 2020-09-23T16:24:37,406 org.hisp.staxwax.XMLException: Failed to move to start element
	at org.hisp.staxwax.reader.DefaultXMLStreamReader.moveToStartElement(DefaultXMLStreamReader.java:105)
	at org.hisp.dhis.dxf2.datavalueset.StreamingXmlDataValueSet.<init>(StreamingXmlDataValueSet.java:66)
	at org.hisp.dhis.dxf2.datavalueset.DefaultDataValueSetService.saveDataValueSet(DefaultDataValueSetService.java:626)
...

Additional details:

  • It works when I try with CategoryOptionCombos