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 Marcin Stański <m_...@poczta.onet.pl> on 2002/09/07 14:00:41 UTC

A problem with XIndice and XUpdate

Hi,

I have a problem with XIndice and XUpdate. When I delete a root of document
using Xupdate:remove, the document is removed, but there is still an empty
resource in the database.
Then, when I try to do anything using the database I get sound signals and
exceptions like that:

java.lang.RuntimeException:
 !!!! Error! Setting the root of a walker to null!!!
        at org.apache.xpath.axes.AxesWalker.setRoot(AxesWalker.java:318)
        at
org.apache.xpath.axes.RootWalkerMultiStep.setRoot(RootWalkerMultiStep.java:9
0)
        at
org.apache.xpath.axes.LocPathIterator.nextNode(LocPathIterator.java:684)
        at
org.apache.xindice.core.query.XPathQueryResolver$ResultSet.prepareNextNode(X
PathQueryResolver.java:1023)
        at
org.apache.xindice.core.query.XPathQueryResolver$ResultSet.<init>(XPathQuery
Resolver.java:995)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.execute(XPathQue
ryResolver.java:247)
        at
org.apache.xindice.core.query.XPathQueryResolver.query(XPathQueryResolver.ja
va:151)
        at
org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:147)
        at
org.apache.xindice.core.Collection.queryCollection(Collection.java:847)
        at
org.apache.xindice.client.corba.CollectionServant.queryCollection(Collection
Servant.java:424)
        at
org.apache.xindice.client.corba.db.CollectionPOA._invoke(CollectionPOA.java:
332)
        at org.openorb.adapter.poa.POA.dispatch(POA.java:975)
        at
org.openorb.net.AbstractServerRequest.dispatch(AbstractServerRequest.java:75
0)
        at
org.openorb.net.ServerManagerImpl.serve_request(ServerManagerImpl.java:1467)
        at
org.openorb.net.ServerManagerImpl.thread_pool_main(ServerManagerImpl.java:14
10)
        at
org.openorb.net.ServerManagerImpl.access$200(ServerManagerImpl.java:77)
        at
org.openorb.net.ServerManagerImpl$PoolThread.run(ServerManagerImpl.java:1557
)


The database works very slowly, but results are correct (I think so, but I'm
not sure of that).

So, I hava a question:
How can I remove a root of document using XUpdate or how can I avoid
occurencing that problem ? For some reasons I cannot use API:
removeResource(document);


    Thanks in advance

        Marcin Stanski


Xindice 1.0b3

Posted by Mark Miller <mm...@moondance.com>.
Where can I find this?


Re: A problem with XIndice and XUpdate

Posted by Tom Bradford <br...@dbxmlgroup.com>.
On Saturday, September 7, 2002, at 05:00 AM, Marcin Stański wrote:
> I have a problem with XIndice and XUpdate. When I delete a root of 
> document
> using Xupdate:remove, the document is removed, but there is still an 
> empty
> resource in the database.

I just recently found this problem in dbXML, so, it's been in the code 
since the very beginning.  What needs to be done is the code will have 
to be modified in two places in the XUpdateQueryResolver after each time 
xu.update() is called.  You'll have to check to see if the Document's 
getDocumentElement() == null.  If so, you'll want to actually delete the 
Document, otherwise update it.  That should fix things.

--
Tom Bradford - CTO - The dbXML Group - http://www.dbxml.com
Apache Xindice (XML Database) - http://xml.apache.org/xindice
Labrador (Web Services Hub) - http://www.notdotnet.org/labrador