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 Younes Boukdir <bo...@cs.tu-berlin.de> on 2004/01/23 21:47:46 UTC

XUpdate Problem

hi,

I need some help please. I m trying to execute this xupdate query

_________
<xupdate:modifications version="1.0"
       xmlns:rdf="http://www.w3.org/1999/02/22-rf-syntax-ns#"
        xmlns:xupdate="http://www.xmldb.org/xupdate" >
 <xupdate:append select="//root">
    <xupdate:element name="component">
      <data rdf:about="uuuu">
         <first>x</first>
         <last>y</last>
      </data>
    </xupdate:element>
 </xupdate:append>
</xupdate:modifications>

_________________

xml document :
<?xml version=\"1.0\"?>
<root>
</root>

_______________________

and i am getting this  exception from xindice.

DEBUG>
java.lang.NullPointerException
        at
org.xmldb.xupdate.lexus.commands.InsertAttribute.execute(InsertAttrib
ute.java:96)
        at
org.xmldb.xupdate.lexus.commands.InsertCommand.executeInstruction(Ins
ertCommand.java:175)
        at
org.apache.xindice.core.xupdate.XUpdateImpl.execute(XUpdateImpl.java:
152)
        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)

Re: XUpdate Problem

Posted by Vadim Gritsenko <va...@reverycodes.com>.
Younes Boukdir wrote:

>hi,
>
>I need some help please. I m trying to execute this xupdate query
>
>_________
><xupdate:modifications version="1.0"
>       xmlns:rdf="http://www.w3.org/1999/02/22-rf-syntax-ns#"
>        xmlns:xupdate="http://www.xmldb.org/xupdate" >
> <xupdate:append select="//root">
>  
>

Why not "/root"?


>    <xupdate:element name="component">
>  
>

Why do you use xupdate:element here?


>      <data rdf:about="uuuu">
>         <first>x</first>
>         <last>y</last>
>      </data>
>    </xupdate:element>
>  
>

Try this instead of what is above (no guarantee that it will help but 
you can try anyway):

>    <component>
>      <data rdf:about="uuuu" xmlns:rdf="http://www.w3.org/1999/02/22-rf-syntax-ns#">
>         <first>x</first>
>         <last>y</last>
>      </data>
>    </component>
>  
>

(and remove rdf ns declaration in the root element) If above won't help, 
you need to get yourself sources of lexus and try debug those:

>java.lang.NullPointerException
>        at
>org.xmldb.xupdate.lexus.commands.InsertAttribute.execute(InsertAttrib
>ute.java:96)
>  
>


Vadim