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 Matthew Egbert <ma...@epcc.ed.ac.uk> on 2002/03/04 15:58:56 UTC

XUpdate

Hello,

  I am learning how to use XUpdate with Xindice...Regardless of the
XUpdate xml, I get the following exception:

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(Unknown Source)
        at
org.apache.xindice.client.corba.db._CollectionStub.queryCollection(Unknown
Source)
        at
org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResult(Unknown
Source)
        at
org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(Unknown
Source)
        at XUpdateTest.main(XUpdateTest.java:37)
XML:DB Exception occured 1 Query Processing Error




The java source is:
----------------------------------------------------------
import org.xmldb.api.base.*;
import org.xmldb.api.modules.*;
import org.xmldb.api.*;
import java.io.FileReader;
import java.io.BufferedReader;


/**
 * Simple XML:DB API example to update the database.
 */
public class XUpdateTest {
   public static void main(String[] args) throws Exception {
      Collection col = null;
      try {
         String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
         Class c = Class.forName(driver);
         
         Database database = (Database) c.newInstance();
         DatabaseManager.registerDatabase(database);
         col =
	   DatabaseManager.getCollection("xmldb:xindice:///db/bbs");

	 BufferedReader file_reader = new BufferedReader (new
FileReader(args[0]));
	 String temp;
	 String xupdate=new String();      
	 
	 temp = file_reader.readLine();
	 while (temp != null) {
	   xupdate=xupdate+temp;
	   temp=file_reader.readLine();
	 }
	 
	 System.out.println("\nXUpdate
Command:\n--------------------------\n"+xupdate+"\n\n\n\n");
	 
         XUpdateQueryService service =
            (XUpdateQueryService) col.getService("XUpdateQueryService",
"1.0");
         service.update(xupdate);
      }
      catch (XMLDBException e) {
         System.err.println("XML:DB Exception occured " + e.errorCode +
" " +
            e.getMessage());
      }
      finally {
         if (col != null) {
            col.close();
         }
      }
   }
}





The xupdate xml is:
----------------------------------------------------------
<?xml version="1.0"?>
<xupdate:modifications version="1.0"
       xmlns:xupdate="http://www.xmldb.org/xupdate"> 

   <xupdate:insert-before select="/posting/to">
      <xupdate:comment>updated</xupdate:comment>
   </xupdate:insert-before>
</xupdate:modifications>


The output is:
----------------------------------------------------------
$ java XUpdateTest eg_xupdate.xml

XUpdate Command:
--------------------------
<?xml version="1.0"?><xupdate:modifications
version="1.0"       xmlns:xupdate="http://www.xmldb.org/xupdate">
<xupdate:insert-before select="/posting/to">
<xupdate:comment>updated</xupdate:comment>
</xupdate:insert-before></xupdate:modifications>




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(Unknown Source)
        at
org.apache.xindice.client.corba.db._CollectionStub.queryCollection(Unknown
Source)
        at
org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResult(Unknown
Source)
        at
org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(Unknown
Source)
        at XUpdateTest.main(XUpdateTest.java:37)
XML:DB Exception occured 1 Query Processing Error






Does anyone have any suggestions as to where to start looking for the
problem?  Is this a xindice bug/is XUpdate still in beta?

Cheers,


Matthew


Re: XUpdate

Posted by "Mark J. Stang" <ma...@earthlink.net>.
Matthew,
There is an xmldb-xupdate.jar, maybe you are picking up an old one?
Did you try removing the "<?xml version="1.0">"?

Mark

Matthew Egbert wrote:

> Thanks for the speedy reply Mark,
>
>   Unfortunately, it doesn't seem to be the collection that's causing the
> problem...
>
> xindiceadmin lc -c /db
>
> locates the collection no prob, and I'm capable of performing:
>
> - XPath queries to the collection
> - document submission to the collection
> (both via a java application which closely resembles the example apps,
> and both without a hitch)
>
> As I've worked with Xindice, axis and tomcat, I have had a few problems
> which have been related to the java classpath.  But this doesn't seem to
> be that kind of error...am I wrong?  Which packages are to be included in
> the classpath to use xupdate (aside from the obvious xmldb.jar)?
>
> Thanks again for the help.
>
> Cheers,
>
> Matthew
>
> On Mon, 4 Mar 2002, Mark J. Stang wrote:
>
> > I love responding to my own e-mail ;-).
> >
> > Also, try:
> >
> >     xindiceadmin lc -c /db
> >
> > This will list out your collections.   Looking at the error, it seems to be dying when
> > it trys to query the collection.
> >
> > Mark
> >
> >
> > "Mark J. Stang" wrote:
> >
> > > I have been doing a lot with XUpdate.   It seems to be working fine.   I thought
> > > there was a bug, but it ended up being my XML.
> > >
> > > I compared your code with mine, the only difference that I saw was that your
> > > XUpdate XML has "<?xml version="1.0">.   I only pass in the <xupdate:modifications...>
> > > for the update.   I don't know if that is enough to cause it to die.   Also, anytime
> > > my "xupdate" fails, it does so by not doing the update.   Does the collection exist?
> > > Try using the collection for something more mundane.
> > >
> > > HTH,
> > >
> > > Mark
> > >
> > > The xupdate xml is:
> > > ----------------------------------------------------------
> > > <?xml version="1.0"?>
> > > <xupdate:modifications version="1.0"
> > >        xmlns:xupdate="http://www.xmldb.org/xupdate">
> > >
> > >    <xupdate:insert-before select="/posting/to">
> > >       <xupdate:comment>updated</xupdate:comment>
> > >    </xupdate:insert-before>
> > > </xupdate:modifications>
> > >
> > > Matthew Egbert wrote:
> > >
> > > > Hello,
> > > >
> > > >   I am learning how to use XUpdate with Xindice...Regardless of the
> > > > XUpdate xml, I get the following exception:
> > > >
> > > > 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(Unknown Source)
> > > >         at
> > > > org.apache.xindice.client.corba.db._CollectionStub.queryCollection(Unknown
> > > > Source)
> > > >         at
> > > > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResult(Unknown
> > > > Source)
> > > >         at
> > > > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(Unknown
> > > > Source)
> > > >         at XUpdateTest.main(XUpdateTest.java:37)
> > > > XML:DB Exception occured 1 Query Processing Error
> > > >
> > > > The java source is:
> > > > ----------------------------------------------------------
> > > > import org.xmldb.api.base.*;
> > > > import org.xmldb.api.modules.*;
> > > > import org.xmldb.api.*;
> > > > import java.io.FileReader;
> > > > import java.io.BufferedReader;
> > > >
> > > > /**
> > > >  * Simple XML:DB API example to update the database.
> > > >  */
> > > > public class XUpdateTest {
> > > >    public static void main(String[] args) throws Exception {
> > > >       Collection col = null;
> > > >       try {
> > > >          String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
> > > >          Class c = Class.forName(driver);
> > > >
> > > >          Database database = (Database) c.newInstance();
> > > >          DatabaseManager.registerDatabase(database);
> > > >          col =
> > > >            DatabaseManager.getCollection("xmldb:xindice:///db/bbs");
> > > >
> > > >          BufferedReader file_reader = new BufferedReader (new
> > > > FileReader(args[0]));
> > > >          String temp;
> > > >          String xupdate=new String();
> > > >
> > > >          temp = file_reader.readLine();
> > > >          while (temp != null) {
> > > >            xupdate=xupdate+temp;
> > > >            temp=file_reader.readLine();
> > > >          }
> > > >
> > > >          System.out.println("\nXUpdate
> > > > Command:\n--------------------------\n"+xupdate+"\n\n\n\n");
> > > >
> > > >          XUpdateQueryService service =
> > > >             (XUpdateQueryService) col.getService("XUpdateQueryService",
> > > > "1.0");
> > > >          service.update(xupdate);
> > > >       }
> > > >       catch (XMLDBException e) {
> > > >          System.err.println("XML:DB Exception occured " + e.errorCode +
> > > > " " +
> > > >             e.getMessage());
> > > >       }
> > > >       finally {
> > > >          if (col != null) {
> > > >             col.close();
> > > >          }
> > > >       }
> > > >    }
> > > > }
> > > >
> > > > The xupdate xml is:
> > > > ----------------------------------------------------------
> > > > <?xml version="1.0"?>
> > > > <xupdate:modifications version="1.0"
> > > >        xmlns:xupdate="http://www.xmldb.org/xupdate">
> > > >
> > > >    <xupdate:insert-before select="/posting/to">
> > > >       <xupdate:comment>updated</xupdate:comment>
> > > >    </xupdate:insert-before>
> > > > </xupdate:modifications>
> > > >
> > > > The output is:
> > > > ----------------------------------------------------------
> > > > $ java XUpdateTest eg_xupdate.xml
> > > >
> > > > XUpdate Command:
> > > > --------------------------
> > > > <?xml version="1.0"?><xupdate:modifications
> > > > version="1.0"       xmlns:xupdate="http://www.xmldb.org/xupdate">
> > > > <xupdate:insert-before select="/posting/to">
> > > > <xupdate:comment>updated</xupdate:comment>
> > > > </xupdate:insert-before></xupdate:modifications>
> > > >
> > > > 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(Unknown Source)
> > > >         at
> > > > org.apache.xindice.client.corba.db._CollectionStub.queryCollection(Unknown
> > > > Source)
> > > >         at
> > > > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResult(Unknown
> > > > Source)
> > > >         at
> > > > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(Unknown
> > > > Source)
> > > >         at XUpdateTest.main(XUpdateTest.java:37)
> > > > XML:DB Exception occured 1 Query Processing Error
> > > >
> > > > Does anyone have any suggestions as to where to start looking for the
> > > > problem?  Is this a xindice bug/is XUpdate still in beta?
> > > >
> > > > Cheers,
> > > >
> > > > Matthew
> >
> >


Re: XUpdate

Posted by Matthew Egbert <ma...@epcc.ed.ac.uk>.
Thanks for the speedy reply Mark,

  Unfortunately, it doesn't seem to be the collection that's causing the
problem...

xindiceadmin lc -c /db

locates the collection no prob, and I'm capable of performing:

- XPath queries to the collection
- document submission to the collection
(both via a java application which closely resembles the example apps,
and both without a hitch)

As I've worked with Xindice, axis and tomcat, I have had a few problems
which have been related to the java classpath.  But this doesn't seem to
be that kind of error...am I wrong?  Which packages are to be included in
the classpath to use xupdate (aside from the obvious xmldb.jar)?

Thanks again for the help.


Cheers,


Matthew


On Mon, 4 Mar 2002, Mark J. Stang wrote:

> I love responding to my own e-mail ;-).
> 
> Also, try:
> 
>     xindiceadmin lc -c /db
> 
> This will list out your collections.   Looking at the error, it seems to be dying when
> it trys to query the collection.
> 
> Mark
> 
> 
> "Mark J. Stang" wrote:
> 
> > I have been doing a lot with XUpdate.   It seems to be working fine.   I thought
> > there was a bug, but it ended up being my XML.
> >
> > I compared your code with mine, the only difference that I saw was that your
> > XUpdate XML has "<?xml version="1.0">.   I only pass in the <xupdate:modifications...>
> > for the update.   I don't know if that is enough to cause it to die.   Also, anytime
> > my "xupdate" fails, it does so by not doing the update.   Does the collection exist?
> > Try using the collection for something more mundane.
> >
> > HTH,
> >
> > Mark
> >
> > The xupdate xml is:
> > ----------------------------------------------------------
> > <?xml version="1.0"?>
> > <xupdate:modifications version="1.0"
> >        xmlns:xupdate="http://www.xmldb.org/xupdate">
> >
> >    <xupdate:insert-before select="/posting/to">
> >       <xupdate:comment>updated</xupdate:comment>
> >    </xupdate:insert-before>
> > </xupdate:modifications>
> >
> > Matthew Egbert wrote:
> >
> > > Hello,
> > >
> > >   I am learning how to use XUpdate with Xindice...Regardless of the
> > > XUpdate xml, I get the following exception:
> > >
> > > 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(Unknown Source)
> > >         at
> > > org.apache.xindice.client.corba.db._CollectionStub.queryCollection(Unknown
> > > Source)
> > >         at
> > > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResult(Unknown
> > > Source)
> > >         at
> > > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(Unknown
> > > Source)
> > >         at XUpdateTest.main(XUpdateTest.java:37)
> > > XML:DB Exception occured 1 Query Processing Error
> > >
> > > The java source is:
> > > ----------------------------------------------------------
> > > import org.xmldb.api.base.*;
> > > import org.xmldb.api.modules.*;
> > > import org.xmldb.api.*;
> > > import java.io.FileReader;
> > > import java.io.BufferedReader;
> > >
> > > /**
> > >  * Simple XML:DB API example to update the database.
> > >  */
> > > public class XUpdateTest {
> > >    public static void main(String[] args) throws Exception {
> > >       Collection col = null;
> > >       try {
> > >          String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
> > >          Class c = Class.forName(driver);
> > >
> > >          Database database = (Database) c.newInstance();
> > >          DatabaseManager.registerDatabase(database);
> > >          col =
> > >            DatabaseManager.getCollection("xmldb:xindice:///db/bbs");
> > >
> > >          BufferedReader file_reader = new BufferedReader (new
> > > FileReader(args[0]));
> > >          String temp;
> > >          String xupdate=new String();
> > >
> > >          temp = file_reader.readLine();
> > >          while (temp != null) {
> > >            xupdate=xupdate+temp;
> > >            temp=file_reader.readLine();
> > >          }
> > >
> > >          System.out.println("\nXUpdate
> > > Command:\n--------------------------\n"+xupdate+"\n\n\n\n");
> > >
> > >          XUpdateQueryService service =
> > >             (XUpdateQueryService) col.getService("XUpdateQueryService",
> > > "1.0");
> > >          service.update(xupdate);
> > >       }
> > >       catch (XMLDBException e) {
> > >          System.err.println("XML:DB Exception occured " + e.errorCode +
> > > " " +
> > >             e.getMessage());
> > >       }
> > >       finally {
> > >          if (col != null) {
> > >             col.close();
> > >          }
> > >       }
> > >    }
> > > }
> > >
> > > The xupdate xml is:
> > > ----------------------------------------------------------
> > > <?xml version="1.0"?>
> > > <xupdate:modifications version="1.0"
> > >        xmlns:xupdate="http://www.xmldb.org/xupdate">
> > >
> > >    <xupdate:insert-before select="/posting/to">
> > >       <xupdate:comment>updated</xupdate:comment>
> > >    </xupdate:insert-before>
> > > </xupdate:modifications>
> > >
> > > The output is:
> > > ----------------------------------------------------------
> > > $ java XUpdateTest eg_xupdate.xml
> > >
> > > XUpdate Command:
> > > --------------------------
> > > <?xml version="1.0"?><xupdate:modifications
> > > version="1.0"       xmlns:xupdate="http://www.xmldb.org/xupdate">
> > > <xupdate:insert-before select="/posting/to">
> > > <xupdate:comment>updated</xupdate:comment>
> > > </xupdate:insert-before></xupdate:modifications>
> > >
> > > 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(Unknown Source)
> > >         at
> > > org.apache.xindice.client.corba.db._CollectionStub.queryCollection(Unknown
> > > Source)
> > >         at
> > > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResult(Unknown
> > > Source)
> > >         at
> > > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(Unknown
> > > Source)
> > >         at XUpdateTest.main(XUpdateTest.java:37)
> > > XML:DB Exception occured 1 Query Processing Error
> > >
> > > Does anyone have any suggestions as to where to start looking for the
> > > problem?  Is this a xindice bug/is XUpdate still in beta?
> > >
> > > Cheers,
> > >
> > > Matthew
> 
> 


Re: XUpdate

Posted by "Mark J. Stang" <ma...@earthlink.net>.
I love responding to my own e-mail ;-).

Also, try:

    xindiceadmin lc -c /db

This will list out your collections.   Looking at the error, it seems to be dying when
it trys to query the collection.

Mark


"Mark J. Stang" wrote:

> I have been doing a lot with XUpdate.   It seems to be working fine.   I thought
> there was a bug, but it ended up being my XML.
>
> I compared your code with mine, the only difference that I saw was that your
> XUpdate XML has "<?xml version="1.0">.   I only pass in the <xupdate:modifications...>
> for the update.   I don't know if that is enough to cause it to die.   Also, anytime
> my "xupdate" fails, it does so by not doing the update.   Does the collection exist?
> Try using the collection for something more mundane.
>
> HTH,
>
> Mark
>
> The xupdate xml is:
> ----------------------------------------------------------
> <?xml version="1.0"?>
> <xupdate:modifications version="1.0"
>        xmlns:xupdate="http://www.xmldb.org/xupdate">
>
>    <xupdate:insert-before select="/posting/to">
>       <xupdate:comment>updated</xupdate:comment>
>    </xupdate:insert-before>
> </xupdate:modifications>
>
> Matthew Egbert wrote:
>
> > Hello,
> >
> >   I am learning how to use XUpdate with Xindice...Regardless of the
> > XUpdate xml, I get the following exception:
> >
> > 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(Unknown Source)
> >         at
> > org.apache.xindice.client.corba.db._CollectionStub.queryCollection(Unknown
> > Source)
> >         at
> > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResult(Unknown
> > Source)
> >         at
> > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(Unknown
> > Source)
> >         at XUpdateTest.main(XUpdateTest.java:37)
> > XML:DB Exception occured 1 Query Processing Error
> >
> > The java source is:
> > ----------------------------------------------------------
> > import org.xmldb.api.base.*;
> > import org.xmldb.api.modules.*;
> > import org.xmldb.api.*;
> > import java.io.FileReader;
> > import java.io.BufferedReader;
> >
> > /**
> >  * Simple XML:DB API example to update the database.
> >  */
> > public class XUpdateTest {
> >    public static void main(String[] args) throws Exception {
> >       Collection col = null;
> >       try {
> >          String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
> >          Class c = Class.forName(driver);
> >
> >          Database database = (Database) c.newInstance();
> >          DatabaseManager.registerDatabase(database);
> >          col =
> >            DatabaseManager.getCollection("xmldb:xindice:///db/bbs");
> >
> >          BufferedReader file_reader = new BufferedReader (new
> > FileReader(args[0]));
> >          String temp;
> >          String xupdate=new String();
> >
> >          temp = file_reader.readLine();
> >          while (temp != null) {
> >            xupdate=xupdate+temp;
> >            temp=file_reader.readLine();
> >          }
> >
> >          System.out.println("\nXUpdate
> > Command:\n--------------------------\n"+xupdate+"\n\n\n\n");
> >
> >          XUpdateQueryService service =
> >             (XUpdateQueryService) col.getService("XUpdateQueryService",
> > "1.0");
> >          service.update(xupdate);
> >       }
> >       catch (XMLDBException e) {
> >          System.err.println("XML:DB Exception occured " + e.errorCode +
> > " " +
> >             e.getMessage());
> >       }
> >       finally {
> >          if (col != null) {
> >             col.close();
> >          }
> >       }
> >    }
> > }
> >
> > The xupdate xml is:
> > ----------------------------------------------------------
> > <?xml version="1.0"?>
> > <xupdate:modifications version="1.0"
> >        xmlns:xupdate="http://www.xmldb.org/xupdate">
> >
> >    <xupdate:insert-before select="/posting/to">
> >       <xupdate:comment>updated</xupdate:comment>
> >    </xupdate:insert-before>
> > </xupdate:modifications>
> >
> > The output is:
> > ----------------------------------------------------------
> > $ java XUpdateTest eg_xupdate.xml
> >
> > XUpdate Command:
> > --------------------------
> > <?xml version="1.0"?><xupdate:modifications
> > version="1.0"       xmlns:xupdate="http://www.xmldb.org/xupdate">
> > <xupdate:insert-before select="/posting/to">
> > <xupdate:comment>updated</xupdate:comment>
> > </xupdate:insert-before></xupdate:modifications>
> >
> > 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(Unknown Source)
> >         at
> > org.apache.xindice.client.corba.db._CollectionStub.queryCollection(Unknown
> > Source)
> >         at
> > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResult(Unknown
> > Source)
> >         at
> > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(Unknown
> > Source)
> >         at XUpdateTest.main(XUpdateTest.java:37)
> > XML:DB Exception occured 1 Query Processing Error
> >
> > Does anyone have any suggestions as to where to start looking for the
> > problem?  Is this a xindice bug/is XUpdate still in beta?
> >
> > Cheers,
> >
> > Matthew


Re: XUpdate

Posted by "Mark J. Stang" <ma...@earthlink.net>.
I have been doing a lot with XUpdate.   It seems to be working fine.   I thought
there was a bug, but it ended up being my XML.

I compared your code with mine, the only difference that I saw was that your
XUpdate XML has "<?xml version="1.0">.   I only pass in the <xupdate:modifications...>
for the update.   I don't know if that is enough to cause it to die.   Also, anytime
my "xupdate" fails, it does so by not doing the update.   Does the collection exist?
Try using the collection for something more mundane.

HTH,

Mark

The xupdate xml is:
----------------------------------------------------------
<?xml version="1.0"?>
<xupdate:modifications version="1.0"
       xmlns:xupdate="http://www.xmldb.org/xupdate">

   <xupdate:insert-before select="/posting/to">
      <xupdate:comment>updated</xupdate:comment>
   </xupdate:insert-before>
</xupdate:modifications>


Matthew Egbert wrote:

> Hello,
>
>   I am learning how to use XUpdate with Xindice...Regardless of the
> XUpdate xml, I get the following exception:
>
> 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(Unknown Source)
>         at
> org.apache.xindice.client.corba.db._CollectionStub.queryCollection(Unknown
> Source)
>         at
> org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResult(Unknown
> Source)
>         at
> org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(Unknown
> Source)
>         at XUpdateTest.main(XUpdateTest.java:37)
> XML:DB Exception occured 1 Query Processing Error
>
> The java source is:
> ----------------------------------------------------------
> import org.xmldb.api.base.*;
> import org.xmldb.api.modules.*;
> import org.xmldb.api.*;
> import java.io.FileReader;
> import java.io.BufferedReader;
>
> /**
>  * Simple XML:DB API example to update the database.
>  */
> public class XUpdateTest {
>    public static void main(String[] args) throws Exception {
>       Collection col = null;
>       try {
>          String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
>          Class c = Class.forName(driver);
>
>          Database database = (Database) c.newInstance();
>          DatabaseManager.registerDatabase(database);
>          col =
>            DatabaseManager.getCollection("xmldb:xindice:///db/bbs");
>
>          BufferedReader file_reader = new BufferedReader (new
> FileReader(args[0]));
>          String temp;
>          String xupdate=new String();
>
>          temp = file_reader.readLine();
>          while (temp != null) {
>            xupdate=xupdate+temp;
>            temp=file_reader.readLine();
>          }
>
>          System.out.println("\nXUpdate
> Command:\n--------------------------\n"+xupdate+"\n\n\n\n");
>
>          XUpdateQueryService service =
>             (XUpdateQueryService) col.getService("XUpdateQueryService",
> "1.0");
>          service.update(xupdate);
>       }
>       catch (XMLDBException e) {
>          System.err.println("XML:DB Exception occured " + e.errorCode +
> " " +
>             e.getMessage());
>       }
>       finally {
>          if (col != null) {
>             col.close();
>          }
>       }
>    }
> }
>
> The xupdate xml is:
> ----------------------------------------------------------
> <?xml version="1.0"?>
> <xupdate:modifications version="1.0"
>        xmlns:xupdate="http://www.xmldb.org/xupdate">
>
>    <xupdate:insert-before select="/posting/to">
>       <xupdate:comment>updated</xupdate:comment>
>    </xupdate:insert-before>
> </xupdate:modifications>
>
> The output is:
> ----------------------------------------------------------
> $ java XUpdateTest eg_xupdate.xml
>
> XUpdate Command:
> --------------------------
> <?xml version="1.0"?><xupdate:modifications
> version="1.0"       xmlns:xupdate="http://www.xmldb.org/xupdate">
> <xupdate:insert-before select="/posting/to">
> <xupdate:comment>updated</xupdate:comment>
> </xupdate:insert-before></xupdate:modifications>
>
> 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(Unknown Source)
>         at
> org.apache.xindice.client.corba.db._CollectionStub.queryCollection(Unknown
> Source)
>         at
> org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.updateResult(Unknown
> Source)
>         at
> org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.update(Unknown
> Source)
>         at XUpdateTest.main(XUpdateTest.java:37)
> XML:DB Exception occured 1 Query Processing Error
>
> Does anyone have any suggestions as to where to start looking for the
> problem?  Is this a xindice bug/is XUpdate still in beta?
>
> Cheers,
>
> Matthew