Thanks Tom.
Iam having JDK version 1.4.1_02, Xindice version 1.0, xalan 2.0.1 and xerces
1.4.3.
Am I having the proper configuration?
If not, please do send me the files and also specify the modifications to be
done
in the startup script.

Sankaran.

-----Original Message-----
From: Tom Sugden [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 01, 2003 2:37 PM
To: [EMAIL PROTECTED]
Subject: RE: Problem with XUpdateQueryService API


Hi Sankara,

There's a problem with Xindice1.0, XUpdate and Java 1.4 that requires you to
endorse certain versions of xerces.jar and xalan.jar. Might this be causing
the problem? If so, I can send you the correct versions and you need to
modify the startup script to endorse the jars using the -D flag.

Tom

-----Original Message-----
From: sankara [mailto:[EMAIL PROTECTED]
Sent: Thursday, May 01, 2003 9:16 AM
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: RE: Problem with XUpdateQueryService API


Finally I got build the xindice.jar after modifying the code as you said.
But still the exeption is thrown:

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:229)
        at xindice.client.XMLDBManager.main(XMLDBManager.java:293)
XML:DB Exception occured 1 Query Compilation Error

My XUpdate query is:
--------------------
<xupdate:modifications xmlns:xupdate="http://xml.apache.org/xindice/";
version="1.0">
<xupdate:remove select="/Directory/Name"/>
</xupdate:modifications>

My XML Resource is:
-------------------
<?xml version="1.0"?>
<Directory>
  <Name>Ramesh Babu</Name>
  <No>9999 9999</No>
</Directory>

My code snippet for update is:
------------------------------
   XUpdateQueryService service
=(XUpdateQueryService)c.getService("XUpdateQueryService", "1.0");
   service.update(xupdateQuery);

What should I do to overcome this problem?
Please do help.

Regards,
Sankaran.

----------------------------------------------------------------------------
-------------------------

-----Original Message-----
From: Gul Akbar [mailto:[EMAIL PROTECTED]
Sent: Wednesday, April 23, 2003 3:59 PM
To: [EMAIL PROTECTED]
Subject: RE: Problem with XUpdateQueryService API



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