Hi guys,
Im trying to upload an xml file with cases but it keeps giving me some
error.
I'm attaching the file and curl error for reference. Could you let me know
where I'm going wrong ?
ERROR
The sever got itself into big trouble! Details:
{"error":"render_error","reason":"function raised error: (new
SyntaxError("syntax error", "", 13)) \nstacktrace: (null,[object
Object])@:13\nrunUpdate(function (doc, req) {var e4xmlJsonClass =
require("util/jsone4xml").e4xmlJsonClass;var base64Class =
require("util/base64").Base64;var dateFormat =
require("util/dateFormat").dateFormat;if (doc) {log("doc wasn't null!
this is unexpected! you will LOSE your information in favor of the
xml");}var content = req.body.replace(/<\?xml[^>]*\?>/, "");var
xml_content = new XML(content);doc = {};doc.form =
e4xmlJsonClass.xml2obj(xml_content);var getUuid = function (form) {if
(req.query && req.query.uid) {return req.query.uid;}meta = null;if
(form.Meta) {meta = form.Meta;} else if (form.meta) {meta = form.meta;}if
(meta && meta.uid) {return meta.uid;}if (meta && meta.instanceID) {return
meta.instanceID;}var guid = function () {var S4 = function () {return ((1 +
Math.random()) * 65536 | 0).toString(16).substring(1);};return S4() + S4()
S4() + S4() + S4() + S4() + S4() + S4();};return guid();};uuid =
getUuid(doc.form);doc._id = uuid.toString();var attachments = {'form.xml':
{content_type: "text/xml", data:
base64Class.encode(req.body)}};doc._attachments = attachments;doc.doc_type
= "XFormInstance";doc['#export_tag'] = "xmlns";doc.xmlns =
doc.form['@xmlns'];doc.received_on = dateFormat(Date(),
"isoUtcDateTime");var resp = {headers: {'Content-Type': "text/plain"},
body: uuid.toString()};return [doc, resp];},[object Object],[object
Array])@/opt/dbcore/share/couchjs/main.js:924\n(function (doc, req)
{var e4xmlJsonClass = require("util/jsone4xml").e4xmlJsonClass;var
base64Class = require("util/base64").Base64;var dateFormat =
require("util/dateFormat").dateFormat;if (doc) {log("doc wasn't null!
this is unexpected! you will LOSE your information in favor of the
xml");}var content = req.body.replace(/<\?xml[^>]*\?>/, "");var
xml_content = new XML(content);doc = {};doc.form =
e4xmlJsonClass.xml2obj(xml_content);var getUuid = function (form) {if
(req.query && req.query.uid) {return req.query.uid;}meta = null;if
(form.Meta) {meta = form.Meta;} else if (form.meta) {meta = form.meta;}if
(meta && meta.uid) {return meta.uid;}if (meta && meta.instanceID) {return
meta.instanceID;}var guid = function () {var S4 = function () {return ((1 +
Math.random()) * 65536 | 0).toString(16).substring(1);};return S4() + S4()
I've seen the error in our logs and am looking into it.
Cory
···
On Apr 15, 2013 8:02 AM, "yashseth" wrote:
Hi guys,
Im trying to upload an xml file with cases but it keeps giving me some
error.
I'm attaching the file and curl error for reference. Could you let me know
where I'm going wrong ?
ERROR
The sever got itself into big trouble! Details:
{"error":"render_error","reason":"function raised error: (new
SyntaxError("syntax error", "", 13)) \nstacktrace: (null,[object
Object])@:13\nrunUpdate(function (doc, req) {var e4xmlJsonClass =
require("util/jsone4xml").e4xmlJsonClass;var base64Class =
require("util/base64").Base64;var dateFormat =
require("util/dateFormat").dateFormat;if (doc) {log("doc wasn't null!
this is unexpected! you will LOSE your information in favor of the
xml");}var content = req.body.replace(/<\?xml[^>]*\?>/, "");var
xml_content = new XML(content);doc = {};doc.form =
e4xmlJsonClass.xml2obj(xml_content);var getUuid = function (form) {if
(req.query && req.query.uid) {return req.query.uid;}meta = null;if
(form.Meta) {meta = form.Meta;} else if (form.meta) {meta = form.meta;}if
(meta && meta.uid) {return meta.uid;}if (meta && meta.instanceID) {return
meta.instanceID;}var guid = function () {var S4 = function () {return ((1 +
Math.random()) * 65536 | 0).toString(16).substring(1);};return S4() + S4()
S4() + S4() + S4() + S4() + S4() + S4();};return guid();};uuid =
getUuid(doc.form);doc._id = uuid.toString();var attachments = {'form.xml':
{content_type: "text/xml", data:
base64Class.encode(req.body)}};doc._attachments = attachments;doc.doc_type
= "XFormInstance";doc['#export_tag'] = "xmlns";doc.xmlns =
doc.form['@xmlns'];doc.received_on = dateFormat(Date(),
"isoUtcDateTime");var resp = {headers: {'Content-Type': "text/plain"},
body: uuid.toString()};return [doc, resp];},[object Object],[object
Array])@/opt/dbcore/share/couchjs/main.js:924\n(function (doc, req)
{var e4xmlJsonClass = require("util/jsone4xml").e4xmlJsonClass;var
base64Class = require("util/base64").Base64;var dateFormat =
require("util/dateFormat").dateFormat;if (doc) {log("doc wasn't null!
this is unexpected! you will LOSE your information in favor of the
xml");}var content = req.body.replace(/<\?xml[^>]*\?>/, "");var
xml_content = new XML(content);doc = {};doc.form =
e4xmlJsonClass.xml2obj(xml_content);var getUuid = function (form) {if
(req.query && req.query.uid) {return req.query.uid;}meta = null;if
(form.Meta) {meta = form.Meta;} else if (form.meta) {meta = form.meta;}if
(meta && meta.uid) {return meta.uid;}if (meta && meta.instanceID) {return
meta.instanceID;}var guid = function () {var S4 = function () {return ((1 +
Math.random()) * 65536 | 0).toString(16).substring(1);};return S4() + S4()
Hi Cory,
Sorry for bothering you again. But I have made a fresh xml file and removed
the BOM, also I have tried the BOM detector you linked me to (which says
there is no BOM detected) . But it is still giving me that error. I am
attaching the file. Thanks so much in advance.
Hi guys,
Im trying to upload an xml file with cases but it keeps giving me some
error.
I'm attaching the file and curl error for reference. Could you let me
know where I'm going wrong ?
ERROR
The sever got itself into big trouble! Details:
{"error":"render_error","reason":"function raised error: (new
SyntaxError("syntax error", "", 13)) \nstacktrace: (null,[object
Object])@:13\nrunUpdate(function (doc, req) {var e4xmlJsonClass =
require("util/jsone4xml").e4xmlJsonClass;var base64Class =
require("util/base64").Base64;var dateFormat =
require("util/dateFormat").dateFormat;if (doc) {log("doc wasn't null!
this is unexpected! you will LOSE your information in favor of the
xml");}var content = req.body.replace(/<\?xml[^>]*\?>/, "");var
xml_content = new XML(content);doc = {};doc.form =
e4xmlJsonClass.xml2obj(xml_content);var getUuid = function (form) {if
(req.query && req.query.uid) {return req.query.uid;}meta = null;if
(form.Meta) {meta = form.Meta;} else if (form.meta) {meta = form.meta;}if
(meta && meta.uid) {return meta.uid;}if (meta && meta.instanceID) {return
meta.instanceID;}var guid = function () {var S4 = function () {return ((1 +
Math.random()) * 65536 | 0).toString(16).substring(1);};return S4() + S4()
S4() + S4() + S4() + S4() + S4() + S4();};return guid();};uuid =
getUuid(doc.form);doc._id = uuid.toString();var attachments = {'form.xml':
{content_type: "text/xml", data:
base64Class.encode(req.body)}};doc._attachments = attachments;doc.doc_type
= "XFormInstance";doc['#export_tag'] = "xmlns";doc.xmlns =
doc.form['@xmlns'];doc.received_on = dateFormat(Date(),
"isoUtcDateTime");var resp = {headers: {'Content-Type': "text/plain"},
body: uuid.toString()};return [doc, resp];},[object Object],[object
Array])@/opt/dbcore/share/couchjs/main.js:924\n(function (doc, req)
{var e4xmlJsonClass = require("util/jsone4xml").e4xmlJsonClass;var
base64Class = require("util/base64").Base64;var dateFormat =
require("util/dateFormat").dateFormat;if (doc) {log("doc wasn't null!
this is unexpected! you will LOSE your information in favor of the
xml");}var content = req.body.replace(/<\?xml[^>]*\?>/, "");var
xml_content = new XML(content);doc = {};doc.form =
e4xmlJsonClass.xml2obj(xml_content);var getUuid = function (form) {if
(req.query && req.query.uid) {return req.query.uid;}meta = null;if
(form.Meta) {meta = form.Meta;} else if (form.meta) {meta = form.meta;}if
(meta && meta.uid) {return meta.uid;}if (meta && meta.instanceID) {return
meta.instanceID;}var guid = function () {var S4 = function () {return ((1 +
Math.random()) * 65536 | 0).toString(16).substring(1);};return S4() + S4()
--
You received this message because you are subscribed to the Google Groups
"commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to commcare-users+unsubscribe@googlegroups.com.
Yash Seth Assistant Software Engineer V +91.11.41881037 M +91.9999069251 E* *yash@digitalgreen.org rikin@digitalgreen.org O D6 & E6, Clarion Collection( The Qutab), Shaheed Jeet Singh Marg, New
Delhi-110016, India
Still looking. We'll follow up off thread when we know more.
cory
···
On Wed, Apr 17, 2013 at 2:01 PM, yashseth wrote:
Hi guys, Any luck on this ?
On Monday, April 15, 2013 5:32:07 PM UTC+5:30, yashseth wrote:
Hi guys,
Im trying to upload an xml file with cases but it keeps giving me some
error.
I'm attaching the file and curl error for reference. Could you let me
know where I'm going wrong ?
ERROR
The sever got itself into big trouble! Details: {"error":"render_error","
**reason":"function raised error: (new SyntaxError("syntax error",
"", 13)) \nstacktrace: (null,[object Object])@:13\nrunUpdate(*function
(doc, req) {var e4xmlJsonClass = require("util/jsone4xml").e4xmlJsonClass;var
base64Class = require("util/base64").Base64;var dateFormat =
require("util/dateFormat").dateFormat;if (doc) {log("doc wasn't
null! this is unexpected! you will LOSE your information in favor of the
xml");}var content = req.body.replace(/<\?xml[^>]\?>/, "");var
xml_content = new XML(content);doc = {};doc.form =
e4xmlJsonClass.xml2obj(xml_content);var getUuid = function (form) {if
(req.query && req.query.uid) {return req.query.uid;}meta = null;if
(form.Meta) {meta = form.Meta;} else if (form.meta) {meta = form.meta;}if
(meta && meta.uid) {return meta.uid;}if (meta && meta.instanceID) {return
meta.instanceID;}var guid = function () {var S4 = function () {return ((1 +
Math.random()) * 65536 | 0).toString(16).substring(1);};return S4() +
S4() + S4() + S4() + S4() + S4() + S4() + S4();};return guid();};uuid =
getUuid(doc.form);doc._id = uuid.toString();var attachments = {'form.xml':
{content_type: "text/xml", data: base64Class.encode(req.body)}};doc.attachments
= attachments;doc.doc_type = "XFormInstance";doc['#**export_tag'] =
"xmlns";doc.xmlns = doc.form['@xmlns'];doc.received_on =
dateFormat(Date(), "isoUtcDateTime");var resp = {headers:
{'Content-Type': "text/plain"}, body: uuid.toString()};return [doc,
resp];},[object Object],[object Array])@/opt/dbcore/share/
couchjs/main.js:924\n(**function (doc, req) {var e4xmlJsonClass =
require("util/jsone4xml").**e4xmlJsonClass;var base64Class =
require("util/base64").*Base64;var dateFormat =
require("util/dateFormat").dateFormat;if (doc) {log("doc wasn't
null! this is unexpected! you will LOSE your information in favor of the
xml");}var content = req.body.replace(/<\?xml[^>]\?>/, "");var
xml_content = new XML(content);doc = {};doc.form =
e4xmlJsonClass.xml2obj(xmlcontent);var getUuid = function (form) {if
(req.query && req.query.uid) {return req.query.uid;}meta = null;if
(form.Meta) {meta = form.Meta;} else if (form.meta) {meta = form.meta;}if
(meta && meta.uid) {return meta.uid;}if (meta && meta.instanceID) {return
meta.instanceID;}var guid = function () {var S4 = function () {return ((1 +
Math.random()) * 65536 | 0).toString(16).substring(1);};return S4() +
S4() + S4() + S4() + S4() + S4() + S4() + S4();};return guid();};uuid =
getUuid(doc.form);doc._id = uuid.toString();var attachments = {'form.xml':
{content_type: "text/xml", data: base64Class.encode(req.body)}};doc.attachments
= attachments;doc.doc_type = "XFormInstance";doc['#**export_tag'] =
"xmlns";doc.xmlns = doc.form['@xmlns'];doc.received_on =
dateFormat(Date(), "isoUtcDateTime");var resp = {headers:
{'Content-Type': "text/plain"}, body: uuid.toString()};return [doc,
resp];},[object Object],[object Array])@/opt/dbcore/share/
couchjs/main.js:993\n("**design/couchforms",[object Array],[object
Array])@/opt/dbcore/share/couchjs/main.js:1468\n()@/
opt/dbcore/share/couchjs/main.js:1512\n@/opt/dbcore/
share/couchjs/main.js:1523**n"}
Hi guys,
Im trying to upload an xml file with cases but it keeps giving me some
error.
I'm attaching the file and curl error for reference. Could you let me
know where I'm going wrong ?
ERROR
The sever got itself into big trouble! Details:
{"error":"render_error","reason":"function raised error: (new
SyntaxError("syntax error", "", 13)) \nstacktrace: (null,[object
Object])@:13\nrunUpdate(function (doc, req) {var e4xmlJsonClass =
require("util/jsone4xml").e4xmlJsonClass;var base64Class =
require("util/base64").Base64;var dateFormat =
require("util/dateFormat").dateFormat;if (doc) {log("doc wasn't null!
this is unexpected! you will LOSE your information in favor of the
xml");}var content = req.body.replace(/<\?xml[^>]*\?>/, "");var
xml_content = new XML(content);doc = {};doc.form =
e4xmlJsonClass.xml2obj(xml_content);var getUuid = function (form) {if
(req.query && req.query.uid) {return req.query.uid;}meta = null;if
(form.Meta) {meta = form.Meta;} else if (form.meta) {meta = form.meta;}if
(meta && meta.uid) {return meta.uid;}if (meta && meta.instanceID) {return
meta.instanceID;}var guid = function () {var S4 = function () {return ((1 +
Math.random()) * 65536 | 0).toString(16).substring(1);};return S4() + S4()
S4() + S4() + S4() + S4() + S4() + S4();};return guid();};uuid =
getUuid(doc.form);doc._id = uuid.toString();var attachments = {'form.xml':
{content_type: "text/xml", data:
base64Class.encode(req.body)}};doc._attachments = attachments;doc.doc_type
= "XFormInstance";doc['#export_tag'] = "xmlns";doc.xmlns =
doc.form['@xmlns'];doc.received_on = dateFormat(Date(),
"isoUtcDateTime");var resp = {headers: {'Content-Type': "text/plain"},
body: uuid.toString()};return [doc, resp];},[object Object],[object
Array])@/opt/dbcore/share/couchjs/main.js:924\n(function (doc, req)
{var e4xmlJsonClass = require("util/jsone4xml").e4xmlJsonClass;var
base64Class = require("util/base64").Base64;var dateFormat =
require("util/dateFormat").dateFormat;if (doc) {log("doc wasn't null!
this is unexpected! you will LOSE your information in favor of the
xml");}var content = req.body.replace(/<\?xml[^>]*\?>/, "");var
xml_content = new XML(content);doc = {};doc.form =
e4xmlJsonClass.xml2obj(xml_content);var getUuid = function (form) {if
(req.query && req.query.uid) {return req.query.uid;}meta = null;if
(form.Meta) {meta = form.Meta;} else if (form.meta) {meta = form.meta;}if
(meta && meta.uid) {return meta.uid;}if (meta && meta.instanceID) {return
meta.instanceID;}var guid = function () {var S4 = function () {return ((1 +
Math.random()) * 65536 | 0).toString(16).substring(1);};return S4() + S4()
--
You received this message because you are subscribed to the Google
Groups "commcare-users" group.
To unsubscribe from this group and stop receiving emails from it, send
an email to commcare-users+unsubscribe@googlegroups.com.
Yash Seth Assistant Software Engineer V +91.11.41881037 M +91.9999069251 E* *yash@digitalgreen.org rikin@digitalgreen.org O D6 & E6, Clarion Collection( The Qutab), Shaheed Jeet Singh Marg, New
Delhi-110016, India