You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by Jethro Grassie <jt...@gmail.com> on 2010/03/12 15:47:07 UTC

XMLDB Exception 0: Failed to execute command 'InsertResource'

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(CollectionImpl.java:125)
        at
org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.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(CollectionImpl.java:113)
        ... 5 more
[B@1db5ecorg.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(CollectionImpl.java:113)
        at
org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.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?

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

Posted by Natalia Shilenkova <ns...@gmail.com>.
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,
> 
> 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. 
> 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.
> 
> Jethro
> 
> 
> 
> On Mon, Mar 15, 2010 at 3:20 PM, Natalia Shilenkova <ns...@gmail.com> 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.
> 
> Regards,
> Natalia
> 
> On Mon, Mar 15, 2010 at 7:33 AM, Jethro Grassie <jt...@gmail.com> 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 <ns...@gmail.com>
> > 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(CollectionImpl.java:125)
> >>         at
> >> org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.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(CollectionImpl.java:113)
> >>         ... 5 more
> >> [B@1db5ecorg.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(CollectionImpl.java:113)
> >>         at
> >> org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.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?
> >>
> >>
> >
> >
> 
> <tmp.xml>


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

Posted by Jethro Grassie <jt...@gmail.com>.
Hi Natalia,

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.
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.

Jethro



On Mon, Mar 15, 2010 at 3:20 PM, Natalia Shilenkova
<ns...@gmail.com>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.
>
> Regards,
> Natalia
>
> On Mon, Mar 15, 2010 at 7:33 AM, Jethro Grassie <jt...@gmail.com>
> 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 <
> nshilenkova@gmail.com>
> > 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(CollectionImpl.java:125)
> >>         at
> >>
> org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.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(CollectionImpl.java:113)
> >>         ... 5 more
> >> [B@1db5ecorg.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(CollectionImpl.java:113)
> >>         at
> >>
> org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.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?
> >>
> >>
> >
> >
>

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

Posted by Natalia Shilenkova <ns...@gmail.com>.
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.

Regards,
Natalia

On Mon, Mar 15, 2010 at 7:33 AM, Jethro Grassie <jt...@gmail.com> 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 <ns...@gmail.com>
> 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(CollectionImpl.java:125)
>>         at
>> org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.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(CollectionImpl.java:113)
>>         ... 5 more
>> [B@1db5ecorg.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(CollectionImpl.java:113)
>>         at
>> org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.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?
>>
>>
>
>

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

Posted by Jethro Grassie <jt...@gmail.com>.
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
<ns...@gmail.com>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(CollectionImpl.java:125)
>         at
> org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.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(CollectionImpl.java:113)
>         ... 5 more
> [B@1db5ecorg.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(CollectionImpl.java:113)
>         at
> org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.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?
>
>
>

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

Posted by Natalia Shilenkova <ns...@gmail.com>.
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(CollectionImpl.java:125)
>         at org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.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(CollectionImpl.java:113)
>         ... 5 more
> [B@1db5ecorg.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(CollectionImpl.java:113)
>         at org.apache.xindice.client.xmldb.xmlrpc.CollectionImpl.storeResource(CollectionImpl.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?
>