[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xindice-users
Subject:    Re: vendor error 2070 with XUpdate
From:       "Jeff Greif" <jgreif () alumni ! princeton ! edu>
Date:       2002-07-22 22:35:51
[Download RAW message or body]

Kevin,

I fixed this problem in my code when I discovered it last week.  Note that
I'm still (for obscure reasons) running dbXML-1.0b4.  I tried undoing what I
thought were the changes, but cannot reproduce the error.

It is true that if you have a document with id foo

<a><c><e><g>aaa</g><k>bbb</k></e></c></a>

and you try an XUpdateService.updateResource("foo", query) with the
erroneous query using cprime instead of c in the select attribute:

<xu:modifications version='1.0' xmlns:xu='http://www.xmldb.org/xupdate'>
<xu:append select='/a/cprime'>
<xu:element name='e'>
<g>/root/mod1</g>
<k>mod1</k>
</xu:element></xu:append></xu:modifications>

a thread in the server beeps and reports:

DEBUG>
 java.lang.Exception: no nodes selected !
        at
org.infozone.lexus.commands.CommandObject.selectNodes(CommandObject.java:82)
        at
org.infozone.lexus.commands.AppendCommand.execute(AppendCommand.java:35)
        at org.dbxml.core.xupdate.XUpdateImpl.execute(XUpdateImpl.java:106)
        at
org.dbxml.core.xupdate.XUpdateQueryResolver$XUpdateQuery.execute(XUpdateQuer
yResolver.java:155)
        at
org.dbxml.core.xupdate.XUpdateQueryResolver.query(XUpdateQueryResolver.java:
99)
        at org.dbxml.core.query.QueryEngine.query(QueryEngine.java:139)
        at org.dbxml.core.Collection.queryDocument(Collection.java:838)
        at
org.dbxml.core.corba.CollectionServant.queryDocument(CollectionServant.java:
446)
        at
org.dbxml.core.corba.db.CollectionPOA._invoke(CollectionPOA.java:355)
        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
)

but this does not produce vendor code 2070 in the client.  Either it's
something more subtle than is captured in my test case, or there was another
situation that I've forgotten.  I'm sorry.

Jeff
----- Original Message -----
From: "Kevin McCarty" <kevinm@txkisd.net>
To: <xindice-users@xml.apache.org>
Sent: Monday, July 22, 2002 6:33 AM
Subject: Re: vendor error 2070 with XUpdate


> Jeff,
>
> Could you send me a copy of your XUpdate statment from your java code...
>
> Thanks,
>
> Kevin
>
> > Your query looks OK, but I received (from an earlier version of
> > Xindice) the same vendor code error when I typed a wrong element name
> > in the select= part of an XUpdate, so select could not set the context
> > for the update.  If there were anything to fiddle with in your XUpdate
> > string, it would be the backslashes before the single-quotes -- I don't
> > think the backslashes are necessary, but they shouldn't do any harm, I
> > think.
> >
> > Jeff
> > ----- Original Message -----
> > From: "Kevin McCarty" <kevinm@txkisd.net>
> > To: <xindice-users@xml.apache.org>
> > Sent: Friday, July 19, 2002 8:32 AM
> > Subject: vendor error 2070 with XUpdate
> >
> >
> >> I am having trouble running XUPDATE.
> >>
> >> When i run this from the command line (redhat) it works:
> >>
> >> xindice xpath -c /db/tpri/teacherData -q /data/teacher/student
> >> [@social_security_number=\'311-11-1111\']
> >>
> >> proving that the context and the query are correct.
> >>
> >> When i run the same query in a java program it works, also.
> >> But when i run a XUpdate java program it doesn't work. I get an 2070
> > vendor
> >> error.
> >>
> >> This is the code I used in the XUpdate:
> >>
> >> Collection col = null;
> >>    ...
> >>    String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
> >>    Class c = Class.forName(driver);
> >>
> >>    Database database = (Database) c.newInstance();
> >>    DatabaseManager.registerDatabase(database);
> >>    col = DatabaseManager.getCollection
> >> ("xmldb:xindice:///db/tpri/teacherData");
> >>
> >>    String xupdate =
> >>       "<xu:modifications version=\"1.0\"
> >> xmlns:xu=\"http://www.xmldb.org/xupdate\">\n" +
> >>       "   <xu:remove select=\"/data/teacher/student
> >> [@social_security_number=\'311-11-1111\']\"/>\n" +
> >>       "</xu:modifications>\n";
> >>    System.out.println(xupdate);
> >>
> >>    XUpdateQueryService service =  (XUpdateQueryService) col.getService
> >> ("XUpdateQueryService", "1.0");
> >>    service.update(xupdate);
> >>    ...
> >>
> >> Does any know exactly what vendor error, 2070, means?!!?
> >>
> >> And is there any error in my code that would cause the 2070 error???
> >>
> >> Thanks,
> >>
> >> Kevin
>
>
> Kevin McCarty
> Software Developer
> Technology Department
> TISD
>
>
>

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic