Hi,

I am trying to utilise Xindice in my software using the CORBA interface (as
the software is all written in C++) and I am having some problems using
XUpdate.

I am simply trying to get the CorbaAPIExample java program working as a C++
program, and have ported most of it to C++ successfully.  Inserting a
document into a collection, and then querying using XPath are all working
fine.  However, when I try to use the XUpdate mechanism, Xindice throws an
exception.  The XUpdate query seems to work nonetheless: if I execute an
XPath query on the document then the document has been successfully updated.

The flavour of exception thrown by Xindice varies. So far, it has thrown

1.) a NullPointerException, with the following stack trace:

java.lang.NullPointerException
        at
org.apache.xindice.core.xupdate.XUpdateQueryResolver$XUpdateQuery.exe
cute(XUpdateQueryResolver.java:163)
        at
org.apache.xindice.core.xupdate.XUpdateQueryResolver.query(XUpdateQue
ryResolver.java:106)
        at
org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:147)

        at
org.apache.xindice.core.Collection.queryDocument(Collection.java:867)

        at
org.apache.xindice.client.corba.CollectionServant.queryDocument(Colle
ctionServant.java:451)
        at
org.apache.xindice.client.corba.db.CollectionPOA._invoke(CollectionPO
A.java:355)
        at org.openorb.adapter.poa.POA.dispatch(POA.java:975)
        at
org.openorb.net.AbstractServerRequest.dispatch(AbstractServerRequest.
java:750)
        at
org.openorb.net.ServerManagerImpl.serve_request(ServerManagerImpl.jav
a:1467)
        at
org.openorb.net.ServerManagerImpl.thread_pool_main(ServerManagerImpl.
java:1410)
        at
org.openorb.net.ServerManagerImpl.access$200(ServerManagerImpl.java:7
7)
        at
org.openorb.net.ServerManagerImpl$PoolThread.run(ServerManagerImpl.ja
va:1557)

2.) a java.lang.Exception: no nodes selected !  with the following stack
trace:

java.lang.Exception: no nodes selected !
        at
org.xmldb.xupdate.lexus.commands.CommandObject.selectNodes(CommandObj
ect.java:141)
        at
org.xmldb.xupdate.lexus.commands.RemoveCommand.execute(RemoveCommand.
java:97)
        at
org.apache.xindice.core.xupdate.XUpdateImpl.execute(XUpdateImpl.java:
153)
        at
org.apache.xindice.core.xupdate.XUpdateQueryResolver$XUpdateQuery.exe
cute(XUpdateQueryResolver.java:163)
        at
org.apache.xindice.core.xupdate.XUpdateQueryResolver.query(XUpdateQue
ryResolver.java:106)
        at
org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:147)

        at
org.apache.xindice.core.Collection.queryDocument(Collection.java:867)

        at
org.apache.xindice.client.corba.CollectionServant.queryDocument(Colle
ctionServant.java:451)
        at
org.apache.xindice.client.corba.db.CollectionPOA._invoke(CollectionPO
A.java:355)
        at org.openorb.adapter.poa.POA.dispatch(POA.java:975)
        at
org.openorb.net.AbstractServerRequest.dispatch(AbstractServerRequest.
java:750)
        at
org.openorb.net.ServerManagerImpl.serve_request(ServerManagerImpl.jav
a:1467)
        at
org.openorb.net.ServerManagerImpl.thread_pool_main(ServerManagerImpl.
java:1410)
        at
org.openorb.net.ServerManagerImpl.access$200(ServerManagerImpl.java:7
7)
        at
org.openorb.net.ServerManagerImpl$PoolThread.run(ServerManagerImpl.ja
va:1557)

and 3.) a java.lang.RuntimeException with the following stack trace:

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:90)
        at
org.apache.xpath.axes.LocPathIterator.nextNode(LocPathIterator.java:6
84)
        at
org.apache.xindice.core.query.XPathQueryResolver$ResultSet.prepareNex
tNode(XPathQueryResolver.java:1023)
        at
org.apache.xindice.core.query.XPathQueryResolver$ResultSet.<init>(XPa
thQueryResolver.java:995)
        at
org.apache.xindice.core.query.XPathQueryResolver$XPathQuery.execute(X
PathQueryResolver.java:247)
        at
org.apache.xindice.core.query.XPathQueryResolver.query(XPathQueryReso
lver.java:151)
        at
org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:147)

        at
org.apache.xindice.core.Collection.queryDocument(Collection.java:867)

        at
org.apache.xindice.client.corba.CollectionServant.queryDocument(Colle
ctionServant.java:451)
        at
org.apache.xindice.client.corba.db.CollectionPOA._invoke(CollectionPO
A.java:355)
        at org.openorb.adapter.poa.POA.dispatch(POA.java:975)
        at
org.openorb.net.AbstractServerRequest.dispatch(AbstractServerRequest.
java:750)
        at
org.openorb.net.ServerManagerImpl.serve_request(ServerManagerImpl.jav
a:1467)
        at
org.openorb.net.ServerManagerImpl.thread_pool_main(ServerManagerImpl.
java:1410)
        at
org.openorb.net.ServerManagerImpl.access$200(ServerManagerImpl.java:7
7)
        at
org.openorb.net.ServerManagerImpl$PoolThread.run(ServerManagerImpl.ja
va:1557)


I am using the ACE ORB with C++, and it seems to be compatible with openorb,
as there is  no problem using the XPath mechanism.

Has anyone had this problem before?  Does anyone know why it is throwing
these exceptions? Could anyone throw any light on it?

Even though the XUpdate operation is apparently working, I really don't like
things throwing exceptions that I don't know the reason for.

Thanks in advance for any help/hints.

Barney Govan

-----------------------------------------------------------
Barney Govan                                . . o o O O O
R&D Engineer                                . . o o O O
Sony Broadcast & Professional Research Labs . . o o O O
Jays Close                                  . . o o O O O
Viables                                     . . o o O O O O
Basingstoke                                 . . o o O O O O
Hampshire                                   . . o o O O O
RG22 4SB
Tel: 01256 483650                               S  O  N  Y

email:  mailto:[EMAIL PROTECTED]

http://www.sony-bplabs.com



*************************************************************************
The information contained in this message or any of its
attachments may be privileged and confidential and intended 
for the exclusive use of the addressee. If you are not the
addressee any disclosure, reproduction, distribution or other
dissemination or use of this communication is strictly prohibited
*************************************************************************

Reply via email to