ODK Validation

1. What is the problem? Be very detailed.
I am using ODK Validate to check (then upload to aggregate server)

2. What app or server are you using and on what device and operating system? Include version numbers.
I am using ODK-Validate-v1.12.0 on Ubuntu 18.04 LTS

3. What you have you tried to fix the problem?
Tried testing the form but have list of errors which mean nothing to me.

4. What steps can we take to reproduce the problem?
Nothing but retrying the validation process.

5. Anything else we should know or have? If you have a test form or screenshots or logs, attach below.

Validating: /home/paul/Desktop/Walks-for-the-Web-survey-form-final_2019-06-28_11-53-52/Walks-for-the-Web-survey-form-final_2019-06-28_11-53-52.xml

Something broke the parser. See above for a hint.
java.lang.NullPointerException
at org.javarosa.xform.parse.XFormParser.parseDoc(XFormParser.java:522)
at org.javarosa.xform.parse.XFormParser.parse(XFormParser.java:369)
at org.javarosa.xform.util.XFormUtils.getFormFromInputStream(XFormUtils.java:97)
at org.javarosa.xform.util.XFormUtils.getFormFromInputStream(XFormUtils.java:78)
at org.opendatakit.validate.FormValidator.validate(FormValidator.java:458)
at org.opendatakit.validate.FormValidator.validate(FormValidator.java:419)
at org.opendatakit.validate.FormValidator.validate(FormValidator.java:391)
at org.opendatakit.validate.FormValidator.actionPerformed(FormValidator.java:282)
at java.desktop/javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1967)
at java.desktop/javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2308)
at java.desktop/javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:405)
at java.desktop/javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:262)
at java.desktop/javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:279)
at java.desktop/java.awt.Component.processMouseEvent(Component.java:6632)
at java.desktop/javax.swing.JComponent.processMouseEvent(JComponent.java:3342)
at java.desktop/java.awt.Component.processEvent(Component.java:6397)
at java.desktop/java.awt.Container.processEvent(Container.java:2263)
at java.desktop/java.awt.Component.dispatchEventImpl(Component.java:5008)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2321)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
at java.desktop/java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4918)
at java.desktop/java.awt.LightweightDispatcher.processMouseEvent(Container.java:4547)
at java.desktop/java.awt.LightweightDispatcher.dispatchEvent(Container.java:4488)
at java.desktop/java.awt.Container.dispatchEventImpl(Container.java:2307)
at java.desktop/java.awt.Window.dispatchEventImpl(Window.java:2772)
at java.desktop/java.awt.Component.dispatchEvent(Component.java:4840)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:772)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:95)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:745)
at java.desktop/java.awt.EventQueue$5.run(EventQueue.java:743)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:742)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)

Hi @Paul_Shapley
welcome to the forum! Please introduce yourself here!

is is an error from aggregate right? not from ODK Validate? Could you share your form?

BTW, do you have an original XLSForm version of your form? If so you might try pumping it thru XLSForm Online just to make sure there's nothing weird in your actual form definition. I find this is a good sanity check...

If not, can you perhaps post your XML

Hello Grzegorz,

Thanks you for helping me on this. Attached is the xml file from the survey done with ODK Collect which I cannot upload to aggregate. I cannot seem to validate this form.

Thanks,

Paul Shapley

Walks-for-the-Web-survey-form-final_2019-06-28_11-53-52.xml (5.8 KB)

Hello Gareth,

Thanks for your reply. I have attached the xml from ODK collect but it will not import into aggregate. I tried to validate the xml but it is giving me the error. I had originally tested it with XLSForm Online and it was OK.

Many thanks,

Paul Shapley

Walks-for-the-Web-survey-form-final_2019-06-28_11-53-52.xml (5.8 KB)

Thnx. Something is very wrong here - this XML isnt an XForm (!). Specifically:

<?xml version="1.0"?>
<Walks-for-the-Web-survey-form-final xmlns:h="http://www.w3.org/1999/xhtml" xmlns:jr="http://openrosa.org/javarosa" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:orx="http://openrosa.org/xforms" xmlns:odk="http://www.opendatakit.org/xforms" id="build_Walks-for-the-Web-survey-form_1561362905">
<walk_for_the_web_survey_group>
    <equipment/>
    <please_review/>
    <name_of_surveyor>Paul Shapley</name_of_surveyor>
    <weather>Dry</weather>
</walk_for_the_web_survey_group>
...
</Walks-for-the-Web-survey-form-final>

doesn't have a primary instance (<instance>), bindings (<bind>) or a <body> element containing any XForm controls. So I'm not too surprsied Validate barfed on it :slight_smile:

This rather looks like an ODK XML submission file, rather than an actual ODK XML form definition. So how exactly did you come by this XML file? What was the actual form that you loaded into Collect to generate it? Are you trying to somehow manually 'load' this submission into Aggregate? ...

BTW, I noticed you have a rather long geotrace (?) value in your result. Long string values can cause problems if your Aggregate server isnt forewarned to deal with them (in your form); see https://docs.opendatakit.org/aggregate-field-length/

Hello Gareth,

Forgive me for being quite new to XForms and xml. I have attached the original xlxs form generated with 'build' then completed it in excel (due to the multiple repeating sections). Also attached is the output xml form downloaded from the online validator which was then placed in the forms folder in odk folder on the android handset. The filed out form was then removed from the android 'instances' folder and this xml file I tried to upload to aggregate to give me the error I submitted originally.

I did it this way (manually) to avoid the upload option on the android device directly to aggregate due to our security policy. This is only a temporary solution to test the process and outputs in order to evaluate ODK.

Thanks,

Paul Shapley

Walks-for-the-Web-survey-form-final.xml (120 KB)

Walks-for-the-Web-survey-form-final.xlsx (14.5 KB)

If you want to manually push up a submission I'd recommend using ODK briefcase, specifically see https://docs.opendatakit.org/briefcase-api/#openrosa-form-submission-overwrite-api [or if you are technically inclined you can also accomplish the same using command-line curl]

The problem may be that you are trying to push up a submission via Aggregate's formUpload API, so Aggregate would be trying to validate your XML document as a XForm definition - which it aint - and barfing.

1 Like