You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-users@xml.apache.org by SATO Akihiro <go...@bluemark.co.jp> on 2002/12/10 13:10:26 UTC

Re: Using XUpdate

Hello, Tom. I once had a problem like you under tomcat-3.3, jdk1.4.

Xindice 1.0 has xerces-1.4.3.jar in its java/lib directory.
I replaced the jar file with xerces-1.4.4, and the error was gone.
Maybe the version 1.4.3 not fit to use XUpdate.


Thanks,
Akihiro


Hi,

I'm using Xindice 1.0 and have just started playing around with XUpdateQueryService but am having a few problems. If I try to perform an XUpdate query that does not match anything in the collection then nothing happens (as expected), but if I change it so that it does match something, then an exception is thrown and the update fails.

For example, if I use the perform the following XUpdate query:

String update =
"<xu:modifications version=\"1.0\" xmlns:xu=\"http://www.xmldb.org/xupdate\">\n" +
"<xu:update select=\"/addresses/address[1]/town\"> \n" +
"Bristol\n" +
"</xu:update>\n" +
"</xu:modifications>";

On a collection that contains the following data:

<addresses xmlns:src="http://xml.apache.org/xindice/Query" src:col="/db/test" src:key="doc3">
<address>
<town>Los Angeles</town>
</address>
<address>
<town>New York</town>
</address>
</addresses>

Then the following exceptions are 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(APIExceptionHelper.java:112)
at org.apache.xindice.client.corba.db._CollectionStub.queryCollection(_CollectionStub.java:833)
at org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResult(XUpdateQueryServiceImpl.java:165)
at org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUpdateQueryServiceImpl.java:185)

org.xmldb.api.base.XMLDBException: Query Processing Error

However, if I change the select attribute to "/addresses/address[3]/town" there are no exceptions.

Does anyone have any idea what I'm doing wrong?

Thanks a lot,
Tom


Re: Using XUpdate

Posted by grenoml <gr...@yahoo.com>.
I just noticed your topic.  You might also check out this set of
Xindice 1.0 scripts which have helped some.

  http://home1.gte.net/greno/Updated_Batch_Files_for_Xindice_1_0.htm

Regards,
Gerry Reno


--- Tom Sugden <to...@epcc.ed.ac.uk> wrote:
> Thanks to Akihiro's advice I've manager to get the
> XUpdateQueryService 
> working under Xindice 1.0, JDK1.4, W2K.
> 
> These are the steps that I took:
> 
> 1. Created $XINDICE_HOME\java\lib\endorsed directory.
> 2. Copied xerces.jar (version 1.4.4) and xalan.jar (the same one that
> is 
> contained in $XINDICE_HOME\java\lib) into the endorsed directory.
> 3. Made a copy of the "startup.bat" file called "startup2.bat".
> 4. Hard coded the -D flags into line 50 of "startup2.bat" as shown
> below:
> 
> %JAVACMD% -Xms16m -Xmx128m -Dxindice.home=%XINDICE_HOME% 
> -Djava.endorsed.dirs=c:\Xindice\java\lib\endorsed 
>
-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xindice.xml.jaxp.DocumentBuilderFactoryImpl
> 
>
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl
> 
> -classpath "%LOCALCLASSPATH%" -noverify
> org.apache.xindice.server.Xindice 
> %XINDICE_HOME%\config\system.xml
> 
> 5. Restarted the server with the new "startup2.bat" file.
> 
> Hopefully this procedure will work for Julien and Alex too.
> 
> Cheers,
> Tom
> 
> At 07:34 PM 12/12/2002 +0900, you wrote:
> 
> 
> >Hello Julien.
> >
> >The article I pointed said (in Japanese) that you have to modify 
> >"startup.bat" file to do so.
> >
> >I don't have Win sandbox, and actually I'm not familiar with
> windows.
> >So I'm sorry that I can't make sure that it works for myself, but I
> hope 
> >this might be your help.
> >
> >thanks.
> >Akihiro
> >
> >
> >
> >At 10:44 AM +0100 02.12.12, Julien Le Dem wrote:
> > >Hi, I use Xindice (1.0) under W2K and have the same problem as
> above about
> > >the exception when executing XUpdate requests.
> > >I looked in start (for linux) and startup.bat (for win) and
> noticed that
> > >start does refers to vm.cfg but startup.bat doesn't ! So i guess
> that this
> > >means the solution given by Akihiro won't work for me (and
> actually it
> > >doesn't ;-) So what do I do ? Should I modify startup.bat and make
> a script
> > >of my own ? (I'm allready tired just thinking about it) Can anyone
> help or
> > >is there only linux-eleets here :-D
> > >Does modifying the %JAVACMD% to add the -D directives is enough ?
> > >ciao, Julien
> > >----- Original Message -----
> > >From: "SATO Akihiro" <go...@bluemark.co.jp>
> > >To: <xi...@xml.apache.org>
> > >Sent: Thursday, December 12, 2002 3:54 AM
> > >Subject: Re: Using XUpdate
> > >
> > >
> > >>
> > >> Hello.
> > >>
> > >> Add
> > >>
> > >> -Djava.endorsed.dirs=/usr/local/xindice/java/lib/endorsed
> > >>
> > >> to the first line (before other -D options).
> > >> Create $XINDICE_HOME/java/lib/endosed/ directory,
> > >> copy xerces.jar,xalan.jar into it, and restart xindice server.
> > >>
> > >> Since SDK has Xalan in itself, you must avoid using it
> > >> with java.endorsed.dirs option.
> > >>
> > >> (Sorry, This does not appears in the howto. I found it in
> Japanese
> > >website)
> > >> http://www.atmarkit.co.jp/fxml/tanpatsu/18xindice/xindice09.html
> > >>
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Re: Using XUpdate

Posted by Tom Sugden <to...@epcc.ed.ac.uk>.
Thanks to Akihiro's advice I've manager to get the XUpdateQueryService 
working under Xindice 1.0, JDK1.4, W2K.

These are the steps that I took:

1. Created $XINDICE_HOME\java\lib\endorsed directory.
2. Copied xerces.jar (version 1.4.4) and xalan.jar (the same one that is 
contained in $XINDICE_HOME\java\lib) into the endorsed directory.
3. Made a copy of the "startup.bat" file called "startup2.bat".
4. Hard coded the -D flags into line 50 of "startup2.bat" as shown below:

%JAVACMD% -Xms16m -Xmx128m -Dxindice.home=%XINDICE_HOME% 
-Djava.endorsed.dirs=c:\Xindice\java\lib\endorsed 
-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xindice.xml.jaxp.DocumentBuilderFactoryImpl 
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl 
-classpath "%LOCALCLASSPATH%" -noverify org.apache.xindice.server.Xindice 
%XINDICE_HOME%\config\system.xml

5. Restarted the server with the new "startup2.bat" file.

Hopefully this procedure will work for Julien and Alex too.

Cheers,
Tom

At 07:34 PM 12/12/2002 +0900, you wrote:


>Hello Julien.
>
>The article I pointed said (in Japanese) that you have to modify 
>"startup.bat" file to do so.
>
>I don't have Win sandbox, and actually I'm not familiar with windows.
>So I'm sorry that I can't make sure that it works for myself, but I hope 
>this might be your help.
>
>thanks.
>Akihiro
>
>
>
>At 10:44 AM +0100 02.12.12, Julien Le Dem wrote:
> >Hi, I use Xindice (1.0) under W2K and have the same problem as above about
> >the exception when executing XUpdate requests.
> >I looked in start (for linux) and startup.bat (for win) and noticed that
> >start does refers to vm.cfg but startup.bat doesn't ! So i guess that this
> >means the solution given by Akihiro won't work for me (and actually it
> >doesn't ;-) So what do I do ? Should I modify startup.bat and make a script
> >of my own ? (I'm allready tired just thinking about it) Can anyone help or
> >is there only linux-eleets here :-D
> >Does modifying the %JAVACMD% to add the -D directives is enough ?
> >ciao, Julien
> >----- Original Message -----
> >From: "SATO Akihiro" <go...@bluemark.co.jp>
> >To: <xi...@xml.apache.org>
> >Sent: Thursday, December 12, 2002 3:54 AM
> >Subject: Re: Using XUpdate
> >
> >
> >>
> >> Hello.
> >>
> >> Add
> >>
> >> -Djava.endorsed.dirs=/usr/local/xindice/java/lib/endorsed
> >>
> >> to the first line (before other -D options).
> >> Create $XINDICE_HOME/java/lib/endosed/ directory,
> >> copy xerces.jar,xalan.jar into it, and restart xindice server.
> >>
> >> Since SDK has Xalan in itself, you must avoid using it
> >> with java.endorsed.dirs option.
> >>
> >> (Sorry, This does not appears in the howto. I found it in Japanese
> >website)
> >> http://www.atmarkit.co.jp/fxml/tanpatsu/18xindice/xindice09.html
> >>


Re: Using XUpdate

Posted by SATO Akihiro <go...@bluemark.co.jp>.

Hello Julien.

The article I pointed said (in Japanese) that you have to modify "startup.bat" file to do so.

I don't have Win sandbox, and actually I'm not familiar with windows.
So I'm sorry that I can't make sure that it works for myself, but I hope this might be your help.

thanks.
Akihiro



At 10:44 AM +0100 02.12.12, Julien Le Dem wrote:
>Hi, I use Xindice (1.0) under W2K and have the same problem as above about
>the exception when executing XUpdate requests.
>I looked in start (for linux) and startup.bat (for win) and noticed that
>start does refers to vm.cfg but startup.bat doesn't ! So i guess that this
>means the solution given by Akihiro won't work for me (and actually it
>doesn't ;-) So what do I do ? Should I modify startup.bat and make a script
>of my own ? (I'm allready tired just thinking about it) Can anyone help or
>is there only linux-eleets here :-D
>Does modifying the %JAVACMD% to add the -D directives is enough ?
>ciao, Julien
>----- Original Message -----
>From: "SATO Akihiro" <go...@bluemark.co.jp>
>To: <xi...@xml.apache.org>
>Sent: Thursday, December 12, 2002 3:54 AM
>Subject: Re: Using XUpdate
>
>
>>
>> Hello.
>>
>> Add
>>
>> -Djava.endorsed.dirs=/usr/local/xindice/java/lib/endorsed
>>
>> to the first line (before other -D options).
>> Create $XINDICE_HOME/java/lib/endosed/ directory,
>> copy xerces.jar,xalan.jar into it, and restart xindice server.
>>
>> Since SDK has Xalan in itself, you must avoid using it
>> with java.endorsed.dirs option.
>>
>> (Sorry, This does not appears in the howto. I found it in Japanese
>website)
>> http://www.atmarkit.co.jp/fxml/tanpatsu/18xindice/xindice09.html
>>

Re: Using XUpdate

Posted by Julien Le Dem <ju...@thet-is.net>.
Hi, I use Xindice (1.0) under W2K and have the same problem as above about
the exception when executing XUpdate requests.
I looked in start (for linux) and startup.bat (for win) and noticed that
start does refers to vm.cfg but startup.bat doesn't ! So i guess that this
means the solution given by Akihiro won't work for me (and actually it
doesn't ;-) So what do I do ? Should I modify startup.bat and make a script
of my own ? (I'm allready tired just thinking about it) Can anyone help or
is there only linux-eleets here :-D
Does modifying the %JAVACMD% to add the -D directives is enough ?
ciao, Julien
----- Original Message -----
From: "SATO Akihiro" <go...@bluemark.co.jp>
To: <xi...@xml.apache.org>
Sent: Thursday, December 12, 2002 3:54 AM
Subject: Re: Using XUpdate


>
> Hello.
>
> Add
>
> -Djava.endorsed.dirs=/usr/local/xindice/java/lib/endorsed
>
> to the first line (before other -D options).
> Create $XINDICE_HOME/java/lib/endosed/ directory,
> copy xerces.jar,xalan.jar into it, and restart xindice server.
>
> Since SDK has Xalan in itself, you must avoid using it
> with java.endorsed.dirs option.
>
> (Sorry, This does not appears in the howto. I found it in Japanese
website)
> http://www.atmarkit.co.jp/fxml/tanpatsu/18xindice/xindice09.html
>
>
>
> At 0:39 AM -0200 02.12.12, Alex Mariano wrote:
> >My vm.cfg contains:
> >
>
>-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xindice.xml.jaxp.Docu
m
> >entBuilderFactoryImpl
>
>-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactor
y
> >Impl
> >
> >What else do I have to put into this file to get the Xupdate problem
solved?
> >
> >----- Original Message -----
> >From: "Alex Mariano Costa de Oliveira" <ma...@inf.ufsc.br>
> >To: <xi...@xml.apache.org>
> >Cc: <vl...@apache.org>
> >Sent: Thursday, December 12, 2002 12:25 AM
> >Subject: Re: Using XUpdate
> >
> >
> >> I am having the same Query Processing Error.
> >> I am using j2sk-1.4.0 and xerces-1.4.3
> >>
> >> Have anybody ever taken this error?
> >>
> >> Thanks in advance..
> >>
> >> ----- Original Message -----
> >> From: "Tom Sugden" <to...@epcc.ed.ac.uk>
> >> To: <xi...@xml.apache.org>
> >> Sent: Tuesday, December 10, 2002 12:22 PM
> >> Subject: Re: Using XUpdate
> >>
> >>
> >> > Thanks Akihiro.
> >> >
> >> > I tried replacing Xindice's xerces jar with version 1.4.4 and then
> >2.1.1,
> >> > but it still doesn't work. Any other ideas?
> >> >
> >> > Thanks,
> >> > Tom
> >> >
> >> >
> >> > At 09:10 PM 12/10/2002 +0900, you wrote:
> >> >
> >> > >Hello, Tom. I once had a problem like you under tomcat-3.3, jdk1.4.
> >> > >
> >> > >Xindice 1.0 has xerces-1.4.3.jar in its java/lib directory.
> >> > >I replaced the jar file with xerces-1.4.4, and the error was gone.
> >> > >Maybe the version 1.4.3 not fit to use XUpdate.
> >> > >
> >> > >
> >> > >Thanks,
> >> > >Akihiro
> >> > >
> >> > >
> >> > >Hi,
> >> > >
> >> > >I'm using Xindice 1.0 and have just started playing around with
> >> > >XUpdateQueryService but am having a few problems. If I try to
perform
> >an
> >> > >XUpdate query that does not match anything in the collection then
> >nothing
> >> > >happens (as expected), but if I change it so that it does match
> >> something,
> >> > >then an exception is thrown and the update fails.
> >> > >
> >> > >For example, if I use the perform the following XUpdate query:
> >> > >
> >> > >String update =
> >> > >"<xu:modifications version=�"1.0�"
> >> > >xmlns:xu=�"http://www.xmldb.org/xupdate�">�n" +
> >> > >"<xu:update select=�"/addresses/address[1]/town�"> �n" +
> >> > >"Bristol�n" +
> >> > >"</xu:update>�n" +
> >> > >"</xu:modifications>";
> >> > >
> >> > >On a collection that contains the following data:
> >> > >
> >> > ><addresses xmlns:src="http://xml.apache.org/xindice/Query"
> >> > >src:col="/db/test" src:key="doc3">
> >> > ><address>
> >> > ><town>Los Angeles</town>
> >> > ></address>
> >> > ><address>
> >> > ><town>New York</town>
> >> > ></address>
> >> > ></addresses>
> >> > >
> >> > >Then the following exceptions are 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(APIExceptionHel
p
> >> er.java:112)
> >> > >at
> >> >
> >>
>
>>org.apache.xindice.client.corba.db._CollectionStub.queryCollection(_Collec
t
> >> ionStub.java:833)
> >> > >at
> >> >
> >>
>
>>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateRes
u
> >> lt(XUpdateQueryServiceImpl.java:165)
> >> > >at
> >> >
> >>
>
>>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XU
p
> >> dateQueryServiceImpl.java:185)
> >> > >
> >> > >org.xmldb.api.base.XMLDBException: Query Processing Error
> >> > >
> >> > >However, if I change the select attribute to
> >"/addresses/address[3]/town"
> >> > >there are no exceptions.
> >> > >
> >> > >Does anyone have any idea what I'm doing wrong?
> >> > >
> >> > >Thanks a lot,
> >> > >Tom
>
>


Re: Using XUpdate

Posted by SATO Akihiro <go...@bluemark.co.jp>.
Hello.

Add

-Djava.endorsed.dirs=/usr/local/xindice/java/lib/endorsed

to the first line (before other -D options).
Create $XINDICE_HOME/java/lib/endosed/ directory,
copy xerces.jar,xalan.jar into it, and restart xindice server.

Since SDK has Xalan in itself, you must avoid using it
with java.endorsed.dirs option.

(Sorry, This does not appears in the howto. I found it in Japanese website)
http://www.atmarkit.co.jp/fxml/tanpatsu/18xindice/xindice09.html



At 0:39 AM -0200 02.12.12, Alex Mariano wrote:
>My vm.cfg contains:
>
>-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xindice.xml.jaxp.Docum
>entBuilderFactoryImpl
>-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactory
>Impl
>
>What else do I have to put into this file to get the Xupdate problem solved?
>
>----- Original Message -----
>From: "Alex Mariano Costa de Oliveira" <ma...@inf.ufsc.br>
>To: <xi...@xml.apache.org>
>Cc: <vl...@apache.org>
>Sent: Thursday, December 12, 2002 12:25 AM
>Subject: Re: Using XUpdate
>
>
>> I am having the same Query Processing Error.
>> I am using j2sk-1.4.0 and xerces-1.4.3
>>
>> Have anybody ever taken this error?
>>
>> Thanks in advance..
>>
>> ----- Original Message -----
>> From: "Tom Sugden" <to...@epcc.ed.ac.uk>
>> To: <xi...@xml.apache.org>
>> Sent: Tuesday, December 10, 2002 12:22 PM
>> Subject: Re: Using XUpdate
>>
>>
>> > Thanks Akihiro.
>> >
>> > I tried replacing Xindice's xerces jar with version 1.4.4 and then
>2.1.1,
>> > but it still doesn't work. Any other ideas?
>> >
>> > Thanks,
>> > Tom
>> >
>> >
>> > At 09:10 PM 12/10/2002 +0900, you wrote:
>> >
>> > >Hello, Tom. I once had a problem like you under tomcat-3.3, jdk1.4.
>> > >
>> > >Xindice 1.0 has xerces-1.4.3.jar in its java/lib directory.
>> > >I replaced the jar file with xerces-1.4.4, and the error was gone.
>> > >Maybe the version 1.4.3 not fit to use XUpdate.
>> > >
>> > >
>> > >Thanks,
>> > >Akihiro
>> > >
>> > >
>> > >Hi,
>> > >
>> > >I'm using Xindice 1.0 and have just started playing around with
>> > >XUpdateQueryService but am having a few problems. If I try to perform
>an
>> > >XUpdate query that does not match anything in the collection then
>nothing
>> > >happens (as expected), but if I change it so that it does match
>> something,
>> > >then an exception is thrown and the update fails.
>> > >
>> > >For example, if I use the perform the following XUpdate query:
>> > >
>> > >String update =
>> > >"<xu:modifications version=$B(B1.0$B(B
>> > >xmlns:xu=$B(Bhttp://www.xmldb.org/xupdate$B(B>$BO(B" +
>> > >"<xu:update select=$B(B/addresses/address[1]/town$B(B> $BO(B" +
>> > >"Bristol$BO(B" +
>> > >"</xu:update>$BO(B" +
>> > >"</xu:modifications>";
>> > >
>> > >On a collection that contains the following data:
>> > >
>> > ><addresses xmlns:src="http://xml.apache.org/xindice/Query"
>> > >src:col="/db/test" src:key="doc3">
>> > ><address>
>> > ><town>Los Angeles</town>
>> > ></address>
>> > ><address>
>> > ><town>New York</town>
>> > ></address>
>> > ></addresses>
>> > >
>> > >Then the following exceptions are 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(APIExceptionHelp
>> er.java:112)
>> > >at
>> >
>>
>>org.apache.xindice.client.corba.db._CollectionStub.queryCollection(_Collect
>> ionStub.java:833)
>> > >at
>> >
>>
>>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResu
>> lt(XUpdateQueryServiceImpl.java:165)
>> > >at
>> >
>>
>>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUp
>> dateQueryServiceImpl.java:185)
>> > >
>> > >org.xmldb.api.base.XMLDBException: Query Processing Error
>> > >
>> > >However, if I change the select attribute to
>"/addresses/address[3]/town"
>> > >there are no exceptions.
>> > >
>> > >Does anyone have any idea what I'm doing wrong?
>> > >
>> > >Thanks a lot,
>> > >Tom


Re: Using XUpdate

Posted by Alex Mariano <ma...@inf.ufsc.br>.
My vm.cfg contains:

-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xindice.xml.jaxp.Docum
entBuilderFactoryImpl
-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactory
Impl

What else do I have to put into this file to get the Xupdate problem solved?

----- Original Message -----
From: "Alex Mariano Costa de Oliveira" <ma...@inf.ufsc.br>
To: <xi...@xml.apache.org>
Cc: <vl...@apache.org>
Sent: Thursday, December 12, 2002 12:25 AM
Subject: Re: Using XUpdate


> I am having the same Query Processing Error.
> I am using j2sk-1.4.0 and xerces-1.4.3
>
> Have anybody ever taken this error?
>
> Thanks in advance..
>
> ----- Original Message -----
> From: "Tom Sugden" <to...@epcc.ed.ac.uk>
> To: <xi...@xml.apache.org>
> Sent: Tuesday, December 10, 2002 12:22 PM
> Subject: Re: Using XUpdate
>
>
> > Thanks Akihiro.
> >
> > I tried replacing Xindice's xerces jar with version 1.4.4 and then
2.1.1,
> > but it still doesn't work. Any other ideas?
> >
> > Thanks,
> > Tom
> >
> >
> > At 09:10 PM 12/10/2002 +0900, you wrote:
> >
> > >Hello, Tom. I once had a problem like you under tomcat-3.3, jdk1.4.
> > >
> > >Xindice 1.0 has xerces-1.4.3.jar in its java/lib directory.
> > >I replaced the jar file with xerces-1.4.4, and the error was gone.
> > >Maybe the version 1.4.3 not fit to use XUpdate.
> > >
> > >
> > >Thanks,
> > >Akihiro
> > >
> > >
> > >Hi,
> > >
> > >I'm using Xindice 1.0 and have just started playing around with
> > >XUpdateQueryService but am having a few problems. If I try to perform
an
> > >XUpdate query that does not match anything in the collection then
nothing
> > >happens (as expected), but if I change it so that it does match
> something,
> > >then an exception is thrown and the update fails.
> > >
> > >For example, if I use the perform the following XUpdate query:
> > >
> > >String update =
> > >"<xu:modifications version=\"1.0\"
> > >xmlns:xu=\"http://www.xmldb.org/xupdate\">\n" +
> > >"<xu:update select=\"/addresses/address[1]/town\"> \n" +
> > >"Bristol\n" +
> > >"</xu:update>\n" +
> > >"</xu:modifications>";
> > >
> > >On a collection that contains the following data:
> > >
> > ><addresses xmlns:src="http://xml.apache.org/xindice/Query"
> > >src:col="/db/test" src:key="doc3">
> > ><address>
> > ><town>Los Angeles</town>
> > ></address>
> > ><address>
> > ><town>New York</town>
> > ></address>
> > ></addresses>
> > >
> > >Then the following exceptions are 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(APIExceptionHelp
> er.java:112)
> > >at
> >
>
>org.apache.xindice.client.corba.db._CollectionStub.queryCollection(_Collect
> ionStub.java:833)
> > >at
> >
>
>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResu
> lt(XUpdateQueryServiceImpl.java:165)
> > >at
> >
>
>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUp
> dateQueryServiceImpl.java:185)
> > >
> > >org.xmldb.api.base.XMLDBException: Query Processing Error
> > >
> > >However, if I change the select attribute to
"/addresses/address[3]/town"
> > >there are no exceptions.
> > >
> > >Does anyone have any idea what I'm doing wrong?
> > >
> > >Thanks a lot,
> > >Tom


Re: Using XUpdate

Posted by Alex Mariano Costa de Oliveira <ma...@inf.ufsc.br>.
I am having the same Query Processing Error.
I am using j2sk-1.4.0 and xerces-1.4.3

Have anybody ever taken this error?

Thanks in advance..

----- Original Message -----
From: "Tom Sugden" <to...@epcc.ed.ac.uk>
To: <xi...@xml.apache.org>
Sent: Tuesday, December 10, 2002 12:22 PM
Subject: Re: Using XUpdate


> Thanks Akihiro.
>
> I tried replacing Xindice's xerces jar with version 1.4.4 and then 2.1.1,
> but it still doesn't work. Any other ideas?
>
> Thanks,
> Tom
>
>
> At 09:10 PM 12/10/2002 +0900, you wrote:
>
> >Hello, Tom. I once had a problem like you under tomcat-3.3, jdk1.4.
> >
> >Xindice 1.0 has xerces-1.4.3.jar in its java/lib directory.
> >I replaced the jar file with xerces-1.4.4, and the error was gone.
> >Maybe the version 1.4.3 not fit to use XUpdate.
> >
> >
> >Thanks,
> >Akihiro
> >
> >
> >Hi,
> >
> >I'm using Xindice 1.0 and have just started playing around with
> >XUpdateQueryService but am having a few problems. If I try to perform an
> >XUpdate query that does not match anything in the collection then nothing
> >happens (as expected), but if I change it so that it does match
something,
> >then an exception is thrown and the update fails.
> >
> >For example, if I use the perform the following XUpdate query:
> >
> >String update =
> >"<xu:modifications version=\"1.0\"
> >xmlns:xu=\"http://www.xmldb.org/xupdate\">\n" +
> >"<xu:update select=\"/addresses/address[1]/town\"> \n" +
> >"Bristol\n" +
> >"</xu:update>\n" +
> >"</xu:modifications>";
> >
> >On a collection that contains the following data:
> >
> ><addresses xmlns:src="http://xml.apache.org/xindice/Query"
> >src:col="/db/test" src:key="doc3">
> ><address>
> ><town>Los Angeles</town>
> ></address>
> ><address>
> ><town>New York</town>
> ></address>
> ></addresses>
> >
> >Then the following exceptions are 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(APIExceptionHelp
er.java:112)
> >at
>
>org.apache.xindice.client.corba.db._CollectionStub.queryCollection(_Collect
ionStub.java:833)
> >at
>
>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResu
lt(XUpdateQueryServiceImpl.java:165)
> >at
>
>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUp
dateQueryServiceImpl.java:185)
> >
> >org.xmldb.api.base.XMLDBException: Query Processing Error
> >
> >However, if I change the select attribute to "/addresses/address[3]/town"
> >there are no exceptions.
> >
> >Does anyone have any idea what I'm doing wrong?
> >
> >Thanks a lot,
> >Tom


Re: Using XUpdate

Posted by SATO Akihiro <go...@bluemark.co.jp>.
Are your jdk version 1.4? If so, you must Modify $XINDICE_HOME/config/vm.cfg file to append java endorse option to starting-up script.
This will be found in howtos.

These two things are all what I did.

Thanks,
Akihiro


At 2:22 PM +0000 02.12.10, Tom Sugden wrote:
>Thanks Akihiro.
>
>I tried replacing Xindice's xerces jar with version 1.4.4 and then 2.1.1, but it still doesn't work. Any other ideas?
>
>Thanks,
>Tom
>
>
>At 09:10 PM 12/10/2002 +0900, you wrote:
>
>>Hello, Tom. I once had a problem like you under tomcat-3.3, jdk1.4.
>>
>>Xindice 1.0 has xerces-1.4.3.jar in its java/lib directory.
>>I replaced the jar file with xerces-1.4.4, and the error was gone.
>>Maybe the version 1.4.3 not fit to use XUpdate.
>>
>>
>>Thanks,
>>Akihiro
>>



Re: Using XUpdate

Posted by Tom Sugden <to...@epcc.ed.ac.uk>.
Thanks Akihiro.

I tried replacing Xindice's xerces jar with version 1.4.4 and then 2.1.1, 
but it still doesn't work. Any other ideas?

Thanks,
Tom


At 09:10 PM 12/10/2002 +0900, you wrote:

>Hello, Tom. I once had a problem like you under tomcat-3.3, jdk1.4.
>
>Xindice 1.0 has xerces-1.4.3.jar in its java/lib directory.
>I replaced the jar file with xerces-1.4.4, and the error was gone.
>Maybe the version 1.4.3 not fit to use XUpdate.
>
>
>Thanks,
>Akihiro
>
>
>Hi,
>
>I'm using Xindice 1.0 and have just started playing around with 
>XUpdateQueryService but am having a few problems. If I try to perform an 
>XUpdate query that does not match anything in the collection then nothing 
>happens (as expected), but if I change it so that it does match something, 
>then an exception is thrown and the update fails.
>
>For example, if I use the perform the following XUpdate query:
>
>String update =
>"<xu:modifications version=\"1.0\" 
>xmlns:xu=\"http://www.xmldb.org/xupdate\">\n" +
>"<xu:update select=\"/addresses/address[1]/town\"> \n" +
>"Bristol\n" +
>"</xu:update>\n" +
>"</xu:modifications>";
>
>On a collection that contains the following data:
>
><addresses xmlns:src="http://xml.apache.org/xindice/Query" 
>src:col="/db/test" src:key="doc3">
><address>
><town>Los Angeles</town>
></address>
><address>
><town>New York</town>
></address>
></addresses>
>
>Then the following exceptions are 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(APIExceptionHelper.java:112)
>at 
>org.apache.xindice.client.corba.db._CollectionStub.queryCollection(_CollectionStub.java:833)
>at 
>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResult(XUpdateQueryServiceImpl.java:165)
>at 
>org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(XUpdateQueryServiceImpl.java:185)
>
>org.xmldb.api.base.XMLDBException: Query Processing Error
>
>However, if I change the select attribute to "/addresses/address[3]/town" 
>there are no exceptions.
>
>Does anyone have any idea what I'm doing wrong?
>
>Thanks a lot,
>Tom