Im sorry I didn't notice the XML data in your first email. Anyhow, that is the 
same versions of software I was using and I found that you need to recompile 
the Xindice.jar package. There seems to be a problems with XUpdate on JDK1.4, 
and it works fine with 1.3.

Here's what you have to do:
Stop Xindice

Edit the file:
<XINDICE_HOME>\java\src\org\apache\xindice\core\xupdate\XObjectImpl.java

Change the code at line 105 
        from: return (NodeList) _xobj.nodeset();
        to:   return (NodeList) _xobj.nodelist();

Recompile the Xindice source code: From your Xindice home directory, run 
the 'build.bat' (assuming you have set the JAVA_HOME environment within the 
batch file).

This will create the Xindice.jar again in the lib folder.

It should work fine after that.



Regards
Gul

Quoting sankara <[EMAIL PROTECTED]>:

> Hi Gul Akbar,
> 
> Thanks for ur reply.
> Xindice version: 1.0
> JDK version: 1.4.1_02
> I had specified the XML data in the mail:
> 
> Resource Id:phone1
> 
> <?xml version="1.0"?>
> <Directory>
> <Name>Ramesh Babu</Name>
> <No>9999 9990</No>
> </Directory>
> 
> Resource Id:phone2
> 
> <?xml version="1.0"?>
> <Directory>
> <Name>Ramesh Babu2</Name>
> <No>9999 9991</No>
> </Directory>
> 
> Thank you.
> -Sankaran.
> 
> -----Original Message-----
> From: Gul Akbar [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, April 23, 2003 3:09 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Problem with XUpdateQueryService API
> 
> 
> I had the same problems.
> Can you give some XML data so I can have a look.
> Are you using JDK1.4 and with which version of Xindice, because there
> are
> definitely some issues with this.
> It may be because of name spaces, and so.
> Give me the above information.
> 
> Gul
> 
> 
> Quoting sankara <[EMAIL PROTECTED]>:
> 
> > Hi all,
> > I don't know why this following code is throwing exception.
> > Plz help.
> >
> > //I have imported necessary packages. Compilation is successfull.
> >
> > class XMLDBClient{
> >     public void updatePersonDetails(String collection,String
> personName){
> >             try{
> >                             Collection
> >
> c=DatabaseManager.getCollection("xmldb:xindice://ap_sankar:4080/db/"+collect
> > ion);
> >                             if(c==null){
> >                                     System.out.println
> ("Collection "+collection+" not found");
> >                                     return;
> >                             }
> >                             String xupdate = "<xupdate:modifications
> > xmlns:xupdate=\"http://www.xmldb.org/xupdate\"; version=\"1.0\">";
> >                             xupdate += "<xupdate:remove
> select=\"/Directory/Name\"/>";
> >                             xupdate += "</xupdate:modifications>";
> >                             System.out.println(xupdate);
> >                             XUpdateQueryService service =
> (XUpdateQueryService)
> > c.getService("XUpdateQueryService", "1.0");
> >                             service.update(xupdate);
> >                             System.out.println("Modified");
> >                     }catch(XMLDBException e){
> >                             System.err.println("XML:DB Exception occured "
> + e.errorCode + " "
> > +
> >                     e.getMessage());
> >                     }
> >     }
> >     public static void main(String args[]){
> >                     XMLDBClient m=new XMLDBClient();
> >                     m.updatePersonDetails("telephoneDirectory","Ramesh
> Babu");
> >     }
> > }
> >
> > The XML document inside collection /db/telephoneDirectory is:
> > <?xml version="1.0"?>
> > <Directory>
> > <Name>Ramesh Babu</Name>
> > <No>9999 9999</No>
> > </Directory>
> >
> > While executing the following exception occurs:
> > 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
> >
> xindice.client.XMLDBManager.updatePersonDetails(XMLDBManager.java:129)
> >     at xindice.client.XMLDBManager.main(XMLDBManager.java:196)
> > XML:DB Exception occured 1 Query Processing Error
> >
> > Thanks,
> > Sankaran.
> >
> >
> 
> 
> -------------------------------------------------
> This mail sent through IMP: webmail.brad.ac.uk
> 
> 


-------------------------------------------------
This mail sent through IMP: webmail.brad.ac.uk

Reply via email to