Briefcase Internal server error


#1

Hi

I want to backup/restore at two stages in kobotoolbox

1- Submission data backup/estore

I have used briefcase for this. Pull is successful. I have deleted some submissions by kobo GUI. I have pushed wtih briefcase. It has given error. but when I go to kobo GUI, I have seen that deleted records are restored. WHy it has given Internal server error? Am I doing something wrong?

java -jar ODK-Briefcase-v1.14.0.jar --push_aggregate --form_id aGce2syimGAyqn4hZcw5QL --storage_directory briefcase --aggregate_url https://kc.humanitarianresponse.info/USER --odk_username USER --odk_password PASSWORD

Preparing for upload of form definition with 0 media attachments
Uploading form definition with no media attachments
UPLOAD FAILED: Form definition upload failed.  Detailed error: INTERNAL SERVER ERROR (500) while accessing: https://kc.humanitarianresponse.info/USER/formUpload
Please verify that the URL, your user credentials and your permissions are all correct.
Error: Failure pushing forms to server. FormIds: aGce2syimGAyqn4hZcw5QL

2- submission + form backup restore

I have deleted form/project from kobo
I have pushed form with birefcase. But it did not work. I could not see the form in kobo GUI? What is the problem? It gives internal server error

java -jar ODK-Briefcase-v1.14.0.jar --push_aggregate --form_id aGce2syimGAyqn4hZcw5QL --storage_directory briefcase --aggregate_url https://kc.humanitarianresponse.info/USER --odk_username USER --odk_password PASSWORD

Preparing for upload of form definition with 0 media attachments
Uploading form definition with no media attachments
UPLOAD FAILED: Form definition upload failed.  Detailed error: INTERNAL SERVER ERROR (500) while accessing: https://kc.humanitarianresponse.info/USER/formUpload
Please verify that the URL, your user credentials and your permissions are all correct.
Error: Failure pushing forms to server. FormIds: aGce2syimGAyqn4hZcw5QL

briefcase.log is the following:

2019-03-08 15:16:45,881 [main] INFO  o.o.briefcase.util.AggregateUtils - Parsing URL https://kc.humanitarianresponse.info/USER/formUpload
2019-03-08 15:16:45,886 [AWT-EventQueue-0] INFO  o.o.b.operations.PushFormToAggregate - Preparing for upload of form definition with 0 media attachments
2019-03-08 15:16:45,898 [main] INFO  o.o.briefcase.util.AggregateUtils - added form_def_file: Kit_Delivery_Form.xml
2019-03-08 15:16:45,902 [AWT-EventQueue-0] INFO  o.o.b.operations.PushFormToAggregate - Uploading form definition with no media attachments
2019-03-08 15:16:45,948 [main] INFO  o.o.briefcase.util.AggregateUtils - Attempting URI https://kc.humanitarianresponse.info/USER/formUpload
2019-03-08 15:16:47,199 [main] ERROR o.o.briefcase.util.AggregateUtils - upload failed
org.opendatakit.briefcase.model.XmlDocumentFetchException: Form definition upload failed.  Detailed error: INTERNAL SERVER ERROR (500) while accessing: https://kc.humanitarianresponse.info/USER/formUpload
Please verify that the URL, your user credentials and your permissions are all correct.
	at org.opendatakit.briefcase.util.AggregateUtils.httpRetrieveXmlDocument(AggregateUtils.java:251)
	at org.opendatakit.briefcase.util.AggregateUtils.uploadFilesToServer(AggregateUtils.java:515)
	at org.opendatakit.briefcase.util.ServerUploader.uploadForm(ServerUploader.java:341)
	at org.opendatakit.briefcase.util.ServerUploader.uploadFormAndSubmissionFiles(ServerUploader.java:217)
	at org.opendatakit.briefcase.util.TransferToServer.doAction(TransferToServer.java:49)
	at org.opendatakit.briefcase.util.TransferToServer.push(TransferToServer.java:56)
	at org.opendatakit.briefcase.operations.PushFormToAggregate.pushFormToAggregate(PushFormToAggregate.java:98)
	at org.opendatakit.briefcase.operations.PushFormToAggregate.lambda$static$0(PushFormToAggregate.java:51)
	at org.opendatakit.common.cli.Cli.lambda$run$4(Cli.java:130)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at org.opendatakit.common.cli.Cli.run(Cli.java:127)
	at org.opendatakit.briefcase.Launcher.main(Launcher.java:79)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
2019-03-08 15:16:47,200 [main] INFO  o.o.briefcase.util.AggregateUtils - Parsing URL https://kc.humanitarianresponse.info/USER/submission
2019-03-08 15:16:47,200 [AWT-EventQueue-0] INFO  o.o.b.operations.PushFormToAggregate - UPLOAD FAILED: Form definition upload failed.  Detailed error: INTERNAL SERVER ERROR (500) while accessing: https://kc.humanitarianresponse.info/USER/formUpload
Please verify that the URL, your user credentials and your permissions are all correct.
2019-03-08 15:16:47,971 [main] INFO  o.o.briefcase.util.AggregateUtils - Parsing URL https://kc.humanitarianresponse.info/USER/view/submissionList?formId=aGce2syimGAyqn4hZcw5QL&cursor=&numEntries=100
2019-03-08 15:16:48,013 [main] INFO  o.o.briefcase.util.AggregateUtils - Attempting URI https://kc.humanitarianresponse.info/USER/view/submissionList?formId=aGce2syimGAyqn4hZcw5QL&cursor=&numEntries=100
2019-03-08 15:16:48,127 [main] INFO  o.o.briefcase.util.AggregateUtils - added xml_submission_file: submission.xml
2019-03-08 15:16:48,171 [main] INFO  o.o.briefcase.util.AggregateUtils - Attempting URI https://kc.humanitarianresponse.info/USER/submission
2019-03-08 15:16:48,288 [main] ERROR o.o.briefcase.util.AggregateUtils - upload failed
org.opendatakit.briefcase.model.XmlDocumentFetchException: Submission upload failed.  Detailed error: NOT FOUND (404) while accessing: https://kc.humanitarianresponse.info/USER/submission
Please verify that the URL, your user credentials and your permissions are all correct.
	at org.opendatakit.briefcase.util.AggregateUtils.httpRetrieveXmlDocument(AggregateUtils.java:251)
	at org.opendatakit.briefcase.util.AggregateUtils.uploadFilesToServer(AggregateUtils.java:515)
	at org.opendatakit.briefcase.util.ServerUploader.uploadSubmission(ServerUploader.java:408)
	at org.opendatakit.briefcase.util.ServerUploader.uploadFormAndSubmissionFiles(ServerUploader.java:245)
	at org.opendatakit.briefcase.util.TransferToServer.doAction(TransferToServer.java:49)
	at org.opendatakit.briefcase.util.TransferToServer.push(TransferToServer.java:56)
	at org.opendatakit.briefcase.operations.PushFormToAggregate.pushFormToAggregate(PushFormToAggregate.java:98)
	at org.opendatakit.briefcase.operations.PushFormToAggregate.lambda$static$0(PushFormToAggregate.java:51)
	at org.opendatakit.common.cli.Cli.lambda$run$4(Cli.java:130)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at org.opendatakit.common.cli.Cli.run(Cli.java:127)
	at org.opendatakit.briefcase.Launcher.main(Launcher.java:79)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
2019-03-08 15:16:48,290 [main] INFO  o.o.briefcase.util.AggregateUtils - added xml_submission_file: submission.xml
2019-03-08 15:16:48,334 [main] INFO  o.o.briefcase.util.AggregateUtils - Attempting URI https://kc.humanitarianresponse.info/USER/submission
2019-03-08 15:16:48,438 [main] ERROR o.o.briefcase.util.AggregateUtils - upload failed
org.opendatakit.briefcase.model.XmlDocumentFetchException: Submission upload failed.  Detailed error: NOT FOUND (404) while accessing: https://kc.humanitarianresponse.info/USER/submission
Please verify that the URL, your user credentials and your permissions are all correct.
	at org.opendatakit.briefcase.util.AggregateUtils.httpRetrieveXmlDocument(AggregateUtils.java:251)
	at org.opendatakit.briefcase.util.AggregateUtils.uploadFilesToServer(AggregateUtils.java:515)
	at org.opendatakit.briefcase.util.ServerUploader.uploadSubmission(ServerUploader.java:408)
	at org.opendatakit.briefcase.util.ServerUploader.uploadFormAndSubmissionFiles(ServerUploader.java:245)
	at org.opendatakit.briefcase.util.TransferToServer.doAction(TransferToServer.java:49)
	at org.opendatakit.briefcase.util.TransferToServer.push(TransferToServer.java:56)
	at org.opendatakit.briefcase.operations.PushFormToAggregate.pushFormToAggregate(PushFormToAggregate.java:98)
	at org.opendatakit.briefcase.operations.PushFormToAggregate.lambda$static$0(PushFormToAggregate.java:51)
	at org.opendatakit.common.cli.Cli.lambda$run$4(Cli.java:130)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at org.opendatakit.common.cli.Cli.run(Cli.java:127)
	at org.opendatakit.briefcase.Launcher.main(Launcher.java:79)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)
2019-03-08 15:16:48,448 [main] ERROR org.opendatakit.briefcase.Launcher - Error
org.opendatakit.briefcase.util.PushFromServerException: Failure pushing forms to server. FormIds: aGce2syimGAyqn4hZcw5QL
	at org.opendatakit.briefcase.util.TransferToServer.push(TransferToServer.java:64)
	at org.opendatakit.briefcase.operations.PushFormToAggregate.pushFormToAggregate(PushFormToAggregate.java:98)
	at org.opendatakit.briefcase.operations.PushFormToAggregate.lambda$static$0(PushFormToAggregate.java:51)
	at org.opendatakit.common.cli.Cli.lambda$run$4(Cli.java:130)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at org.opendatakit.common.cli.Cli.run(Cli.java:127)
	at org.opendatakit.briefcase.Launcher.main(Launcher.java:79)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.jdt.internal.jarinjarloader.JarRsrcLoader.main(JarRsrcLoader.java:58)