org.xml.sax.SAXParseException: Document root element is missing.
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3170)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:501)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at com.jxml.quick.engine.QCMLBindings.parse(Unknown Source)
at com.jxml.quick.Quick.parse(Unknown Source)
at com.jxml.quick.Quick.parseString(Unknown Source)
at net.sourceforge.jxunit.JXTestCase.getValueSchema(Unknown Source)
at net.sourceforge.jxunit.JXTestCase.getObjectSchema(Unknown Source)
at net.sourceforge.jxunit.JXTestCase.getObjectValue(Unknown Source)
at net.sourceforge.jxunit.JXTestSet.eval(Unknown Source)
at net.sourceforge.jxunit.JXDo.eval(Unknown Source)
at net.sourceforge.jxunit.JXTestCase.runTest(Unknown Source)
I believe the XML is valid because in the JXU if I comment out the "set" directive then everything works fine.
Anyone have any ideas?
Thanks,
Rhett
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi:
I am trying to use the following JXU file:
<jxu>
<set name="input"
value="cust1.xml" schema="../../mappings/FindMembersRequest.qiml"/>
<eval stepClass="ecstest.FindMembers"/>
<ifEqual
converse="true"
name="output"
schema="../../mappings/FindMembersRequest.qiml"
file="cust1.xml">
<save
name="output"
schema="../../mappings/FindMembersRequest.qiml"
file="err.txt"/>
<fail>"Failure"</fail>
</ifEqual>
</jxu>
The input data and output data are the same and very simple:
<?xml version="1.0" encoding="ISO-8859-1"?>
<find-members>
<first-name>Rhett</first-name>
<last-name>Guthrie</last-name>
</find-members>
I get the following error:
org.xml.sax.SAXParseException: Document root element is missing.
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3182)
at org.apache.crimson.parser.Parser2.fatal(Parser2.java:3170)
at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:501)
at org.apache.crimson.parser.Parser2.parse(Parser2.java:305)
at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:442)
at org.xml.sax.helpers.XMLReaderAdapter.parse(XMLReaderAdapter.java:223)
at com.jxml.quick.engine.QCMLBindings.parse(Unknown Source)
at com.jxml.quick.Quick.parse(Unknown Source)
at com.jxml.quick.Quick.parseString(Unknown Source)
at net.sourceforge.jxunit.JXTestCase.getValueSchema(Unknown Source)
at net.sourceforge.jxunit.JXTestCase.getObjectSchema(Unknown Source)
at net.sourceforge.jxunit.JXTestCase.getObjectValue(Unknown Source)
at net.sourceforge.jxunit.JXTestSet.eval(Unknown Source)
at net.sourceforge.jxunit.JXDo.eval(Unknown Source)
at net.sourceforge.jxunit.JXTestCase.runTest(Unknown Source)
I believe the XML is valid because in the JXU if I comment out the "set" directive then everything works fine.
Anyone have any ideas?
Thanks,
Rhett
Hi Rhett
Your qjml and xml files are valid.In the set element use file atribute instead of using value.
Hope this may solve the problem
Thanks
Thomas
Ah! good catch, that was the problem.
Thanks a ton.
-rg