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

Reply via email to