Re: XMLDB Exception 0: Failed to execute command 'InsertResource'

Natalia Shilenkova <[email protected]> Wed, 17 Mar 2010 21:07:31 -0400
Newsgroups gmane.text.xml.xindice.user
Message-ID <[email protected]>
--Apple-Mail-141-656958887
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=us-ascii

The problem was caused by incorrect assumption that processing =
instruction cannot be inside XML elements, documents were mistakenly =
rejected as not well formed. This is fixed in current SVN trunk.

Regards,
Natalia

On Mar 15, 2010, at 1:41 PM, Jethro Grassie wrote:

> Hi Natalia,
>=20
> Attached is one of the XML files that fails.
> I know its fairly large (near 1mb) but I have larger documents going =
in fine so its not a size issue.
> Also I have validated it against the schema and checked the character =
encoding.=20
> All of the XML I am trying to insert are the same format and validate =
to the same schema and I can see nothing that points to why it wont =
load. Its really odd.
>=20
> Jethro
>=20
>=20
>=20
> On Mon, Mar 15, 2010 at 3:20 PM, Natalia Shilenkova =
<[email protected]> wrote:
> Would you be able to provide a sample of a failing document? If not,
> do you see anything that failing documents have in common? Having a
> sample of the document that causes the trouble would be ideal.
>=20
> Regards,
> Natalia
>=20
> On Mon, Mar 15, 2010 at 7:33 AM, Jethro Grassie <[email protected]> =
wrote:
> > Hi Natalia,
> >
> > There's nothing to note in the server log unfortunately.
> > I have tried this now on a couple of machines with the same problem.
> >
> >
> >
> >
> > On Sun, Mar 14, 2010 at 12:37 AM, Natalia Shilenkova =
<[email protected]>
> > wrote:
> >>
> >> Hi Jethro,
> >> Unfortunately, the exception trace you included is from the client =
and
> >> does not provide enough information. Can you please check Xindice =
server
> >> logs and see what kind of problems are reported there? Server logs =
by
> >> default are located in Xindice installation directory, under
> >> logs/xindice.out.
> >> Regards,
> >> Natalia
> >> On Mar 12, 2010, at 9:47 AM, Jethro Grassie wrote:
> >>
> >> Hi
> >>
> >> I am using xindice version 1.1 and get the following error when =
adding
> >> some XML documents:
> >>
> >> $ ./bin/xindice ad -v -c /db/legislation -f tmp.xml
> >> trying to register database
> >> XMLDB Exception 0: Failed to execute command 'InsertResource' on =
server:
> >> http://127.0.0.1:8888/xindice/, message: Error parsing Document
> >> org.xmldb.api.base.XMLDBException: Failed to execute command
> >> 'InsertResource' on server: http://127.0.0.1:8888/xindice/, =
message: Error
> >> parsing Document
> >>         at
> >> =
org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteCommand(Col=
lectionImpl.java:125)
> >>         at
> >> =
org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(Collec=
tionImpl.java:241)
> >>         at
> >> =
org.apache.xindice.tools.command.AddDocument.execute(AddDocument.java:89)
> >>         at =
org.apache.xindice.tools.XMLTools.execute(XMLTools.java:284)
> >>         at =
org.apache.xindice.tools.XMLTools.process(XMLTools.java:164)
> >>         at org.apache.xindice.tools.XMLTools.main(XMLTools.java:84)
> >> Caused by: org.apache.xmlrpc.XmlRpcException: Error parsing =
Document
> >>         at
> >> org.apache.xmlrpc.XmlRpcClient$Worker.execute(XmlRpcClient.java)
> >>         at =
org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java)
> >>         at
> >> =
org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteCommand(Col=
lectionImpl.java:113)
> >>         ... 5 more
> >> [[email protected]: Error parsing Document
> >>         at
> >> org.apache.xmlrpc.XmlRpcClient$Worker.execute(XmlRpcClient.java)
> >>         at =
org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java)
> >>         at
> >> =
org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteCommand(Col=
lectionImpl.java:113)
> >>         at
> >> =
org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(Collec=
tionImpl.java:241)
> >>         at
> >> =
org.apache.xindice.tools.command.AddDocument.execute(AddDocument.java:89)
> >>         at =
org.apache.xindice.tools.XMLTools.execute(XMLTools.java:284)
> >>         at =
org.apache.xindice.tools.XMLTools.process(XMLTools.java:164)
> >>         at org.apache.xindice.tools.XMLTools.main(XMLTools.java:84)
> >>
> >> Note this doesnt always happen, just some XML files.
> >> I am putting a huge amount of XML documents which all conform to =
the same
> >> schema into a xindice database.
> >> About 25% are failing with the same error as above.
> >> I have double and triple checked the XML is valid by checking with =
a
> >> validating parser.
> >>
> >>
> >> Any ideas?
> >>
> >>
> >
> >
>=20
> <tmp.xml>


--Apple-Mail-141-656958887
Content-Transfer-Encoding: 7bit
Content-Type: text/html;
	charset=us-ascii

<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>The problem was caused by incorrect assumption that processing instruction cannot be inside XML elements, documents were mistakenly rejected as not well formed. This is fixed in current SVN trunk.</div><div><br></div><div>Regards,</div><div>Natalia</div><br><div><div>On Mar 15, 2010, at 1:41 PM, Jethro Grassie wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi Natalia,<br><br>Attached is one of the XML files that fails.<br>I know its fairly large (near 1mb) but I have larger documents going in fine so its not a size issue.<br>Also I have validated it against the schema and checked the character encoding. <br>
All of the XML I am trying to insert are the same format and validate to the same schema and I can see nothing that points to why it wont load. Its really odd.<br><br>Jethro<br><br><br><br><div class="gmail_quote">On Mon, Mar 15, 2010 at 3:20 PM, Natalia Shilenkova <span dir="ltr">&lt;<a href="mailto:[email protected]">[email protected]</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Would you be able to provide a sample of a failing document? If not,<br>
do you see anything that failing documents have in common? Having a<br>
sample of the document that causes the trouble would be ideal.<br>
<br>
Regards,<br>
<font color="#888888">Natalia<br>
</font><div><div></div><div class="h5"><br>
On Mon, Mar 15, 2010 at 7:33 AM, Jethro Grassie &lt;<a href="mailto:[email protected]">[email protected]</a>&gt; wrote:<br>
&gt; Hi Natalia,<br>
&gt;<br>
&gt; There's nothing to note in the server log unfortunately.<br>
&gt; I have tried this now on a couple of machines with the same problem.<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Sun, Mar 14, 2010 at 12:37 AM, Natalia Shilenkova &lt;<a href="mailto:[email protected]">[email protected]</a>&gt;<br>
&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi Jethro,<br>
&gt;&gt; Unfortunately, the exception trace you included is from the client and<br>
&gt;&gt; does not provide enough information. Can you please check Xindice server<br>
&gt;&gt; logs and see what kind of problems are reported there? Server logs by<br>
&gt;&gt; default are located in Xindice installation directory, under<br>
&gt;&gt; logs/xindice.out.<br>
&gt;&gt; Regards,<br>
&gt;&gt; Natalia<br>
&gt;&gt; On Mar 12, 2010, at 9:47 AM, Jethro Grassie wrote:<br>
&gt;&gt;<br>
&gt;&gt; Hi<br>
&gt;&gt;<br>
&gt;&gt; I am using xindice version 1.1 and get the following error when adding<br>
&gt;&gt; some XML documents:<br>
&gt;&gt;<br>
&gt;&gt; $ ./bin/xindice ad -v -c /db/legislation -f tmp.xml<br>
&gt;&gt; trying to register database<br>
&gt;&gt; XMLDB Exception 0: Failed to execute command 'InsertResource' on server:<br>
&gt;&gt; <a href="http://127.0.0.1:8888/xindice/" target="_blank">http://127.0.0.1:8888/xindice/</a>, message: Error parsing Document<br>
&gt;&gt; org.xmldb.api.base.XMLDBException: Failed to execute command<br>
&gt;&gt; 'InsertResource' on server: <a href="http://127.0.0.1:8888/xindice/" target="_blank">http://127.0.0.1:8888/xindice/</a>, message: Error<br>
&gt;&gt; parsing Document<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at<br>
&gt;&gt; org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteCommand(CollectionImpl.java:125)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at<br>
&gt;&gt; org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.java:241)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at<br>
&gt;&gt; org.apache.xindice.tools.command.AddDocument.execute(AddDocument.java:89)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xindice.tools.XMLTools.execute(XMLTools.java:284)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xindice.tools.XMLTools.process(XMLTools.java:164)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xindice.tools.XMLTools.main(XMLTools.java:84)<br>
&gt;&gt; Caused by: org.apache.xmlrpc.XmlRpcException: Error parsing Document<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at<br>
&gt;&gt; org.apache.xmlrpc.XmlRpcClient$Worker.execute(XmlRpcClient.java)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at<br>
&gt;&gt; org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteCommand(CollectionImpl.java:113)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ... 5 more<br>
&gt;&gt; [[email protected]: Error parsing Document<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at<br>
&gt;&gt; org.apache.xmlrpc.XmlRpcClient$Worker.execute(XmlRpcClient.java)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xmlrpc.XmlRpcClient.execute(XmlRpcClient.java)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at<br>
&gt;&gt; org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.runRemoteCommand(CollectionImpl.java:113)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at<br>
&gt;&gt; org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.java:241)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at<br>
&gt;&gt; org.apache.xindice.tools.command.AddDocument.execute(AddDocument.java:89)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xindice.tools.XMLTools.execute(XMLTools.java:284)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xindice.tools.XMLTools.process(XMLTools.java:164)<br>
&gt;&gt; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.xindice.tools.XMLTools.main(XMLTools.java:84)<br>
&gt;&gt;<br>
&gt;&gt; Note this doesnt always happen, just some XML files.<br>
&gt;&gt; I am putting a huge amount of XML documents which all conform to the same<br>
&gt;&gt; schema into a xindice database.<br>
&gt;&gt; About 25% are failing with the same error as above.<br>
&gt;&gt; I have double and triple checked the XML is valid by checking with a<br>
&gt;&gt; validating parser.<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;&gt; Any ideas?<br>
&gt;&gt;<br>
&gt;&gt;<br>
&gt;<br>
&gt;<br>
</div></div></blockquote></div><br>
<span>&lt;tmp.xml&gt;</span></blockquote></div><br></body></html>
--Apple-Mail-141-656958887--