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 Kurt Kavanaugh <kk...@teletrol.com> on 2003/10/04 17:43:21 UTC

Riddle me this

I have taken several steps backward to get any xupdate command to work in Xindice 1.0.

I am using the phone exampe

<person>
   <fname>John</fname>
   <lname>Smith</lname>
   <phone type="work">563-456-7890</phone>
   <phone type="home">534-567-8901</phone>
   <email type="home">jsmith@somemail.com</email>
   <email type="work">john@lovesushi.com</email>
   <address type="home">34 S. Colon St.</address>
   <address type="work">9967 W. Shrimp Ave.</address>
</person>

I added this to my collection.

I used the EXACT example on the Xindice site site. line for line.

        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/addresses");

           String xupdate = "<xu:modifications version=\"1.0\"" +
              "      xmlns:xu=\"http://www.xmldb.org/xupdate\">" +
              "   <xu:remove select=\"/person/phone[@type = 'home']\"/>" +
              "   <xu:update select=\"/person/phone[@type = 'work']\">" +
              "       480-300-3003" +
              "   </xu:update>" +
              "</xu:modifications>";

           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();
           }
        }

And I get the below...

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)
	at src.explorer.test.QueryTest.exampleTest(QueryTest.java:82)
	at src.explorer.test.QueryTest.main(QueryTest.java:32)
XML:DB Exception occured 1 Query Compilation Error

Clues?

Re: Riddle me this

Posted by Kurt <ku...@comcast.net>.
Or is this, as the stack may imply, a corba/orb issue?

----- Original Message -----
From: "Kurt" <ku...@comcast.net>
To: <xi...@xml.apache.org>
Sent: Monday, October 06, 2003 6:27 AM
Subject: Re: Riddle me this


> Is the answer to my question... move to 1.1? Or should the below work. I
am
> trying to get the xupdate example to work as advertised in the Xindice
> documentation on the apache website.
>
> Also note I did modify the collection name from addresses to my collection
> name.
>
>
> ----- Original Message -----
> From: "Kurt Kavanaugh" <kk...@teletrol.com>
> To: "Xindice users (E-mail)" <xi...@xml.apache.org>
> Sent: Saturday, October 04, 2003 11:43 AM
> Subject: Riddle me this
>
>
>
> I have taken several steps backward to get any xupdate command to work in
> Xindice 1.0.
>
> I am using the phone exampe
>
> <person>
>    <fname>John</fname>
>    <lname>Smith</lname>
>    <phone type="work">563-456-7890</phone>
>    <phone type="home">534-567-8901</phone>
>    <email type="home">jsmith@somemail.com</email>
>    <email type="work">john@lovesushi.com</email>
>    <address type="home">34 S. Colon St.</address>
>    <address type="work">9967 W. Shrimp Ave.</address>
> </person>
>
> I added this to my collection.
>
> I used the EXACT example on the Xindice site site. line for line.
>
>         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/addresses");
>
>            String xupdate = "<xu:modifications version=\"1.0\"" +
>               "      xmlns:xu=\"http://www.xmldb.org/xupdate\">" +
>               "   <xu:remove select=\"/person/phone[@type = 'home']\"/>" +
>               "   <xu:update select=\"/person/phone[@type = 'work']\">" +
>               "       480-300-3003" +
>               "   </xu:update>" +
>               "</xu:modifications>";
>
>            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();
>            }
>         }
>
> And I get the below...
>
> 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 src.explorer.test.QueryTest.exampleTest(QueryTest.java:82)
> at src.explorer.test.QueryTest.main(QueryTest.java:32)
> XML:DB Exception occured 1 Query Compilation Error
>
> Clues?
>


Re: Riddle me this

Posted by Kurt <ku...@comcast.net>.
Is the answer to my question... move to 1.1? Or should the below work. I am
trying to get the xupdate example to work as advertised in the Xindice
documentation on the apache website.

Also note I did modify the collection name from addresses to my collection
name.


----- Original Message -----
From: "Kurt Kavanaugh" <kk...@teletrol.com>
To: "Xindice users (E-mail)" <xi...@xml.apache.org>
Sent: Saturday, October 04, 2003 11:43 AM
Subject: Riddle me this



I have taken several steps backward to get any xupdate command to work in
Xindice 1.0.

I am using the phone exampe

<person>
   <fname>John</fname>
   <lname>Smith</lname>
   <phone type="work">563-456-7890</phone>
   <phone type="home">534-567-8901</phone>
   <email type="home">jsmith@somemail.com</email>
   <email type="work">john@lovesushi.com</email>
   <address type="home">34 S. Colon St.</address>
   <address type="work">9967 W. Shrimp Ave.</address>
</person>

I added this to my collection.

I used the EXACT example on the Xindice site site. line for line.

        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/addresses");

           String xupdate = "<xu:modifications version=\"1.0\"" +
              "      xmlns:xu=\"http://www.xmldb.org/xupdate\">" +
              "   <xu:remove select=\"/person/phone[@type = 'home']\"/>" +
              "   <xu:update select=\"/person/phone[@type = 'work']\">" +
              "       480-300-3003" +
              "   </xu:update>" +
              "</xu:modifications>";

           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();
           }
        }

And I get the below...

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 src.explorer.test.QueryTest.exampleTest(QueryTest.java:82)
at src.explorer.test.QueryTest.main(QueryTest.java:32)
XML:DB Exception occured 1 Query Compilation Error

Clues?