[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xmlbeans-dev
Subject:    RE: Unable to parse xml got this exception! help needed
From:       <Ramesh.Chitturi () wellsfargo ! com>
Date:       2006-04-24 17:08:58
Message-ID: E7443F9905C3C1459596F811784809B70771E3 () msgswbiadsm35 ! wellsfargo ! com
[Download RAW message or body]

Jacob,

 

      I validated the xml string in the spy against the schema got green
flag.

 

Thanks

Ramesh

  _____  

From: Jacob Danner [mailto:jacobd@bea.com] 
Sent: Monday, April 24, 2006 11:25 AM
To: dev@xmlbeans.apache.org; user@xmlbeans.apache.org
Subject: RE: Unable to parse xml got this exception! help needed

 

This actually seems like one for the user list.

XML object is not of type D=ROOT ELEMENT

I've seen this when I've had an invalid XML fragment. Although the error
is not terribly clear, when I've seen this its because I was missing a
root element. As an example, I intended for my xml to look like:

<root>

<a />

<b />

</root>

Instead my 'xml' looked like:

<a />

<b />

And that's when I've seen this issue. Notice there is not a root element
to the doc and this is bad XML.

Can you confirm that you haven't created a similar condition in your
code?

-Jacobd

 

        

 

 

  _____  

From: Ramesh.Chitturi@wellsfargo.com
[mailto:Ramesh.Chitturi@wellsfargo.com] 
Sent: Monday, April 24, 2006 9:17 AM
To: xmlbeans-dev@xml.apache.org
Subject: Unable to parse xml got this exception! help needed

 

   Hi All,

    I got this exception when calling the parse method on factory.

    org.apache.xmlbeans.XmlException: XML object is not of type D=ROOT
ELEMENT

        at
org.apache.xmlbeans.impl.store.Root.autoTypedDocument(Root.java:445)

        at org.apache.xmlbeans.impl.store.Root.loadXml(Root.java:1049)

        at org.apache.xmlbeans.impl.store.Root.loadXml(Root.java:1033)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoa
derBase.java:333)

        at
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoa
derBase.java:244)

        at
com.wellsfargo.ilonline.mortgage.service.decision.xmlbeans.response.Ilol
lpsDocument$Factory.parse(Unknown Source)

        at
com.wellsfargo.ilonline.shared.service.credit.TestXmlBeans.main(TestXmlB
eans.java:56)

 

  Any help will be appreciated.

Thanks

Ramesh.

_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.

[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:st1="urn:schemas-microsoft-com:office:smarttags" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Unable to parse xml got this exception! help needed</title>
<o:SmartTagType namespaceuri="urn:schemas-microsoft-com:office:smarttags"
 name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0in;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:purple;
	text-decoration:underline;}
p
	{mso-margin-top-alt:auto;
	margin-right:0in;
	mso-margin-bottom-alt:auto;
	margin-left:0in;
	font-size:12.0pt;
	font-family:"Times New Roman";}
span.EmailStyle18
	{mso-style-type:personal;
	font-family:Arial;
	color:navy;}
span.EmailStyle19
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:navy;}
@page Section1
	{size:8.5in 11.0in;
	margin:1.0in 1.25in 1.0in 1.25in;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=EN-US link=blue vlink=purple>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Jacob,<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I validated the \
xml string in the spy against the schema got green flag.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Thanks<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>Ramesh<o:p></o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> Jacob Danner
[mailto:jacobd@bea.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, April 24, 2006 11:25
AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName \
w:st="on">dev@xmlbeans.apache.org</st1:PersonName>; user@xmlbeans.apache.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> RE: Unable to parse xml
got this exception! help needed</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>This actually seems like one for the user \
list.<o:p></o:p></span></font></p>

<p><font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red'>XML object is not of type D=ROOT \
ELEMENT<o:p></o:p></span></font></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>I&#8217;ve seen this when I&#8217;ve had an invalid XML
fragment. Although the error is not terribly clear, when I&#8217;ve seen this
its because I was missing a root element. As an example, I intended for my xml
to look like:<o:p></o:p></span></font></p>

<p style='margin:0in;margin-bottom:.0001pt'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>&lt;root&gt;<o:p></o:p></span></font></p>

<p style='margin:0in;margin-bottom:.0001pt'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>&lt;a /&gt;<o:p></o:p></span></font></p>

<p style='margin:0in;margin-bottom:.0001pt'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>&lt;b /&gt;<o:p></o:p></span></font></p>

<p style='margin:0in;margin-bottom:.0001pt'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>&lt;/root&gt;<o:p></o:p></span></font></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>Instead my &#8216;xml&#8217; looked like:<o:p></o:p></span></font></p>

<p style='margin:0in;margin-bottom:.0001pt'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>&lt;a /&gt;<o:p></o:p></span></font></p>

<p style='margin:0in;margin-bottom:.0001pt'><font size=2 color=red
face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>&lt;b /&gt;<o:p></o:p></span></font></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>And that&#8217;s when I&#8217;ve seen this issue. Notice there
is not a root element to the doc and this is bad XML.<o:p></o:p></span></font></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>Can you confirm that you haven&#8217;t created a similar
condition in your code?<o:p></o:p></span></font></p>

<p><font size=2 face="Courier New"><span style='font-size:10.0pt;font-family:
"Courier New"'>-Jacobd<o:p></o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span \
style='font-size:12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p><font size=3 face="Times New Roman"><span \
style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
Ramesh.Chitturi@wellsfargo.com [mailto:Ramesh.Chitturi@wellsfargo.com] <br>
<b><span style='font-weight:bold'>Sent:</span></b> Monday, April 24, 2006 9:17
AM<br>
<b><span style='font-weight:bold'>To:</span></b> xmlbeans-dev@xml.apache.org<br>
<b><span style='font-weight:bold'>Subject:</span></b> Unable to parse xml got this
exception! help needed</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p><font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red'>&nbsp;&nbsp;</span></font> <font size=2
color=red face="Courier New"><span style='font-size:10.0pt;font-family:"Courier New";
color:red'>Hi All,</span></font><o:p></o:p></p>

<p><font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red'>&nbsp;&nbsp;&nbsp; I got this exception
when calling the parse</span></font> <font size=2 color=red face="Courier New"><span
style='font-size:10.0pt;font-family:"Courier New";color:red'>method on \
factory.</span></font><o:p></o:p></p>

<p><font size=3 face="Times New Roman"><span \
style='font-size:12.0pt'>&nbsp;</span></font><font size=2 color=red face="Courier \
New"><span style='font-size:10.0pt;font-family: "Courier \
New";color:red'>&nbsp;&nbsp;</span></font> <font size=2 color=red face="Courier \
New"><span style='font-size:10.0pt;font-family:"Courier New"; \
color:red'>org.apache.xmlbeans.XmlException: XML object is not of type D=ROOT \
ELEMENT</span></font><o:p></o:p></p>

<p><font size=3 face="Times New Roman"><span \
style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</span></font><font size=2 color=red face="Courier New"><span style='font-size: \
10.0pt;font-family:"Courier New";color:red'>at \
org.apache.xmlbeans.impl.store.Root.autoTypedDocument(Root.java:445)</span></font><o:p></o:p></p>


<p><font size=3 face="Times New Roman"><span \
style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</span></font><font size=2 color=red face="Courier New"><span style='font-size: \
10.0pt;font-family:"Courier New";color:red'>at \
org.apache.xmlbeans.impl.store.Root.loadXml(Root.java:1049)</span></font><o:p></o:p></p>


<p><font size=3 face="Times New Roman"><span \
style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</span></font><font size=2 color=red face="Courier New"><span style='font-size: \
10.0pt;font-family:"Courier New";color:red'>at \
org.apache.xmlbeans.impl.store.Root.loadXml(Root.java:1033)</span></font><o:p></o:p></p>


<p><font size=3 face="Times New Roman"><span \
style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</span></font><font size=2 color=red face="Courier New"><span style='font-size: \
10.0pt;font-family:"Courier New";color:red'>at \
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:333)</span></font><o:p></o:p></p>


<p><font size=3 face="Times New Roman"><span \
style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</span></font><font size=2 color=red face="Courier New"><span style='font-size: \
10.0pt;font-family:"Courier New";color:red'>at \
org.apache.xmlbeans.impl.schema.SchemaTypeLoaderBase.parse(SchemaTypeLoaderBase.java:244)</span></font><o:p></o:p></p>


<p><font size=3 face="Times New Roman"><span \
style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</span></font><font size=2 color=red face="Courier New"><span style='font-size: \
10.0pt;font-family:"Courier New";color:red'>at \
com.wellsfargo.ilonline.mortgage.service.decision.xmlbeans.response.IlollpsDocument$Factory.parse(Unknown
 Source)</span></font><o:p></o:p></p>

<p><font size=3 face="Times New Roman"><span \
style='font-size:12.0pt'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
</span></font><font size=2 color=red face="Courier New"><span style='font-size: \
10.0pt;font-family:"Courier New";color:red'>at \
com.wellsfargo.ilonline.shared.service.credit.TestXmlBeans.main(TestXmlBeans.java:56)</span></font><o:p></o:p></p>


<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p><font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red'>&nbsp; Any help will be \
appreciated.</span></font><o:p></o:p></p>

<p><font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red'>Thanks</span></font><o:p></o:p></p>

<p><font size=2 color=red face="Courier New"><span style='font-size:10.0pt;
font-family:"Courier New";color:red'>Ramesh.</span></font><o:p></o:p></p>

</div>

</body>

</html>
<PRE>_______________________________________________________________________
Notice:  This email message, together with any attachments, may contain
information  of  BEA Systems,  Inc.,  its subsidiaries  and  affiliated
entities,  that may be confidential,  proprietary,  copyrighted  and/or
legally privileged, and is intended solely for the use of the individual
or entity named in this message. If you are not the intended recipient,
and have received this message in error, please immediately return this
by email and then delete it.
</PRE>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic