Hi Matthew, Are you using jdk140? If so, I had the same problem. There is a problem with the version of xalan that comes with jdk140. As suggested by Kimbro, put the xalan/xerces jars into your <jre-home>/lib/endorsed folder and restart xindice. Everything should be fine then.
Best wishes, John > -----Original Message----- > From: Matthew Egbert [mailto:[EMAIL PROTECTED] > Sent: lundi, 4. mars 2002 15:59 > To: [email protected] > Subject: 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(Unk > nown Source) > at > org.apache.xindice.client.corba.db._CollectionStub.queryCollec > tion(Unknown > Source) > at > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceIm > pl.updateResult(Unknown > Source) > at > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceIm > pl.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(Unk > nown Source) > at > org.apache.xindice.client.corba.db._CollectionStub.queryCollec > tion(Unknown > Source) > at > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceIm > pl.updateResult(Unknown > Source) > at > org.apache.xindice.client.xmldb.services.XUpdateQueryServiceIm > pl.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 > >
