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 Aurélien Knapp <a....@isidore-one.net> on 2002/10/09 17:04:26 UTC

Xupdate problems

Hi, 
I would like to use Xupdate but when i run my java program i have the 
following errors : 
java RetrieveDocument
org.omg.CORBA.UNKNOWN:   minor code: 0 completed: Maybe
        at java.lang.Class.newInstance0(Native Method)
        at java.lang.Class.newInstance(Class.java:237)
        at 
com.sun.corba.se.internal.iiop.ReplyMessage.getSystemException(ReplyMessage.java:93)
        at 
com.sun.corba.se.internal.iiop.ClientResponseImpl.getSystemException(ClientResponseImpl.java:83)
        at 
com.sun.corba.se.internal.corba.ClientDelegate.invoke(ClientDelegate.java:204)
        at org.omg.CORBA.portable.ObjectImpl._invoke(ObjectImpl.java:459)
        at 
org.apache.xindice.client.corba.db._CollectionStub.queryCollection(_CollectionStub.java:820)
        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 RetrieveDocument.main(RetrieveDocument.java:30)
XML:DB Exception occured 1

What's wrong knowing that I use the following example :  

import org.xmldb.api.base.*;
import org.xmldb.api.modules.*;
import org.xmldb.api.*;

import java.io.*;

public class RetrieveDocument {
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://laointernal:4080/db/addressbook");
	    //DatabaseManager.getCollection("xmldb:xindice:///db/addressbook");

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


I have no problem to retrieve data, query data, create and remove collection 
but when i want to create a node......

Can someone help me.
Thanks for help.

Aurélien