You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Sean <se...@openjawtech.com> on 2002/09/02 18:48:07 UTC
XUpdate (update & updateResource)
Hi,
I am new to developing with Xindice. I have encountered some problems in
using
XUpdate to delete nodes, both using the update and the updateResource call.
The update string I create is as follows:
<xu:modifications version="1.0" xmlns:xu="http://www.xmldb.org/xupdate">
<xu:remove
select="//messageSet/aggregation[@requestTag='OTA_AirLowFareSearchRQ']/rules
et[@name='switch6']/rule[@name='log']"/>
</xu:modifications>
To confirm that the XPATH is correct I apply it to the collection before the
update and it correctly locates the
node.
When I use the update method of the the XUpdateQueryService I get the
following exception on the client side
(in this case the invocation is within a Tomcat 4.0.2 servlet):
org.apache.xindice.client.corba.db.APIException:
IDL:org/apache/xindice/client/corba/db/APIException:1.0
at
org.apache.xindice.client.corba.db.APIExceptionHelper.read(APIExceptionHelpe
r.java:112)
at
org.apache.xindice.client.corba.db._CollectionStub.queryCollection(_Collecti
onStub.java:846)
at
org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResul
t(XUpdateQueryServiceImpl.java:165)
at
org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUpd
ateQueryServiceImpl.java:185)
at com.openjaw.utils.DatabaseWrapper.updateDocument(Unknown Source)
at com.openjaw.config.jspBean.RuleBean.deleteRule(Unknown Source)
I have debugged into the queryCollection method in _CollectionStub and all
the values set up look to be what
I would expect. The exception occurs in the call to invoke.
Having failed with update I thought I would try updateResource. I get an
exception in the server
as follows:
java.lang.ClassCastException: org.apache.xml.dtm.ref.DTMNodeIterator
at
org.apache.xindice.core.xupdate.XObjectImpl.nodeset(XObjectImpl.java:105)
at
org.xmldb.xupdate.lexus.commands.CommandObject.selectNodes(CommandObject.jav
a:139)
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.execute(XU
pdateQueryResolver.java:163)
at
org.apache.xindice.core.xupdate.XUpdateQueryResolver.query(XUpdateQueryResol
ver.java:106)
at
org.apache.xindice.core.query.QueryEngine.query(QueryEngine.java:147)
at
org.apache.xindice.core.Collection.queryDocument(Collection.java:867)
I have looked at the code and I'm guessing that there is a clah between the
Xalan DTMNodeIterator and whatever
XObject implementation is used within
org.apache.xindice.core.xupdate.XObjectImpl.
Any help on these issues would be appreciated.
Thanks,
Sean
------------------------------------
OpenJaw Technologies Ltd.
Guinness Enterprise Centre
Taylor's Lane
Dublin 8
Ireland
http://www.openjawtech.com
Phone: +353 1 4100681
Fax: + 353 1 4100985