Hi,

So, I finaly find out the problem.

In specification (first link) xupdate:append  has an attribute child, but in
the examples from second link there is no attribute child.

When I removed it, and changed select="/Jobs[last()]" It works perfektly..
(adding new element to the end of xml document)

Thanks for help.


DigiD

----- Original Message -----
From: "Mark J. Stang" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 22, 2002 7:01 PM
Subject: Re: Xupdate problem


> Here are some sites that talk about XUpdate:
>
>  http://www.xmldb.org/xupdate/xupdate-wd.html
>
> and
>
>  http://www.xmldatabases.org/projects/XUpdate-UseCases/
>
> I don't know if you are supposed to put last() in quotes...
>
> HTH,
>
> Mark
>
> Martin Dibala wrote:
>
> > Hi,
> >
> > I have a problem with xUpdate when sending to xindice.
> >
> > This is the xupdate command i'm trying to execute:
> >
> > <xu:modifications version="1.0"
> > xmlns:xu="http://www.xmldb.org/xupdate";>
> > <xu:append select="/Jobs" child="last()">
> > <xu:element name="Job">akoze nieco v texte elementu</xu:element>
> > </xu:append>
> > </xu:modifications>
> >
> > and resulting exception is:
> >
> > 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:833)        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
> > ixstore.iXstore.updateDocument(iXstore.java:314)        at
> > ixstore.iXstore.main(iXstore.java:340)
org.xmldb.api.base.XMLDBException:
> > Query Processing Error  at
> >
org.apache.xindice.core.FaultCodes.createXMLDBException(FaultCodes.java:239)
> > at
> >
org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResul
> > t(XUpdateQueryServiceImpl.java:170)     at
> >
org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUpd
> > ateQueryServiceImpl.java:185)   at
> > ixstore.iXstore.updateDocument(iXstore.java:314)        at
> > ixstore.iXstore.main(iXstore.java:340)
> >
> > I'm using the update function from XUpdateQueryService.
> >
> > The second problem is, I have tryed it on a single document, with
> > updateResource function
> > and there was an error in server.
> >
> > The xupdate command was the same, but error was:
> >
> > D:\digid_iXcon\xml-xindice-1.0>startup
> > java -classpath
> > ";\config;d:\digid_iXcon\xml-xindice-1.0\java\lib\ant-1.4.1.jar;
> >
d:\digid_iXcon\xml-xindice-1.0\java\lib\examples.jar;d:\digid_iXcon\xml-xind
> > ice-
> >
1.0\java\lib\infozone-tools.jar;d:\digid_iXcon\xml-xindice-1.0\java\lib\open
> > orb-
> >
1.2.0.jar;d:\digid_iXcon\xml-xindice-1.0\java\lib\openorb_tools-1.2.0.jar;d:
> > \dig
> >
id_iXcon\xml-xindice-1.0\java\lib\xalan-2.0.1.jar;d:\digid_iXcon\xml-xindice
> > -1.0
> >
\java\lib\xerces-1.4.3.jar;d:\digid_iXcon\xml-xindice-1.0\java\lib\xindice.j
> > ar;d
> >
:\digid_iXcon\xml-xindice-1.0\java\lib\xml-apis-1.0.jar;d:\digid_iXcon\xml-x
> > indi
> >
ce-1.0\java\lib\xmldb-sdk.jar;d:\digid_iXcon\xml-xindice-1.0\java\lib\xmldb-
> > xupd
> >
ate.jar;d:\digid_iXcon\xml-xindice-1.0\java\lib\xmldb.jar;c:\JBuilder6\jdk1.
> > 3.1\
> > lib\tools.jar" -noverify org.apache.xindice.core.server.Xindice
> > d:\digid_iXcon\x
> > ml-xindice-1.0\config\system.xml
> >
> > Xindice 1.0 (Birthday)
> >
> > Database: 'db' initializing
> > Script: 'GET' added to script storage
> > Service: 'db' started
> > Service: 'HTTPServer' started @ http://sp-digid:4080/
> > Service: 'APIService' started
> >
> > Server Running
> > DEBUG>
> > 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(CommandObj
> > ect.java:139)
> >         at
> > org.xmldb.xupdate.lexus.commands.AppendCommand.execute(AppendCommand.
> > java:84)
> >         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)
> >
> > Any idea what am I doing wrong?
> >
> > DigiD
>
>
>


Reply via email to