My XUpdate class is :
package org.apache.xindice.examples;
import org.xmldb.api.base.*;
import org.xmldb.api.modules.*;
import org.xmldb.api.*;
/**
* Simple XML:DB API example to update the database.
*/
public class XUpdate {
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/Ritmic/RitmicCancion");
/*String xupdate = "<xu:modifications version=\"1.0\"" +
" xmlns:xu=\"http://www.xmldb.org/xupdate\">" +
" <xu:remove select=\"/person/[EMAIL PROTECTED] = 'home']\"/>" +
" <xu:update select=\"/person/[EMAIL PROTECTED] = 'work']\">" +
" 480-300-3003" +
" </xu:update>" +
"</xu:modifications>";
*/
if ( col == null )
{
System.out.println ( "Col es igual a null" );
}
String xupdate = "<xu:modifications version=\"1.0\"" +
" xmlns:xu=\"http://www.xmldb.org/xupdate\">" +
" <xu:update select=\"/RitmicCanciones/RitmicCancion[titulo=\"Spanish Horses\"]\">" +
" English Horses" +
" </xu:update>" +
"</xu:modifications>";
XUpdateQueryService service =
(XUpdateQueryService) col.getService("XUpdateQueryService", "1.0");
long count = service.update(xupdate);
System.out.println(count + " entries updated.");
}
catch (XMLDBException e) {
System.err.println("XML:DB Exception occured " + e.errorCode + " " +
e.getMessage());
}
finally {
if (col != null) {
col.close();
}
}
}
}
Thanks you in advance.
Brian Hills <[EMAIL PROTECTED]> wrote:
Can you post your XUpdate class code?Brian-----Original Message-----
From: Llerta amat [mailto:[EMAIL PROTECTED]
Sent: 28 January 2003 14:37
To: [email protected]
Cc: [EMAIL PROTECTED]
Subject: Using XUpdatePlease, help me, I installed xIndice1.0 and jdk1.4 on UNIX.
When I execute :
bash-2.05$ ./run org.apache.xindice.examples.Xupdate
The output is :
bash-2.05$ ./run org.apache.xindice.examples.XUpdateCMD_HOME: .
CMD_NAME: run
CLASSPATH : ./../../lib/xmldb.jar:./../../lib/xmldb-xupdate.jar:./../../lib/xml
db-sdk.jar:./../../lib/xml-apis-1.0.jar:./../../lib/xindice.jar:./../../lib/xind
ice-http-0.8.jar:./../../lib/xerces-1.4.3.jar:./../../lib/xalan-2.0.1.jar:./../.
./lib/openorb_tools-1.2.0.jar:./../../lib/openorb-1.2.0.jar:./../../lib/infozone
-tools.jar:./../../lib/ant-1.4.1.jar::./src/class
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(APIExcepti
onHelper.java:112)
at org.apache.xindice.client.corba.db._CollectionStub.queryCollection(_C
ollectionStub.java:833)
at org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.upda
teResult(XUpdateQueryServiceImpl.java:165)
at org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.upda
te(XUpdateQueryServiceImpl.java:185)
at org.apache.xindice.examples.XUpdate.main(XUpdate.java:106)
XML:DB Exception occured 1 Query Compilation Error
I did TomSugden's steps too, but nothing. The result is the same.
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 "start" .
4. Hard coded the -D flags in start:
The last lines in this file �start�:
while test $RESTART
do
RESTART=
java -Xms16m -Xmx168m -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 -Dxindice.home="$XINDICE_HOME" $VMPROPS -classpath "$CLASSPATH" org.apache.xindice.server.Xindice $* &
wait $!
done
What can I do?. Please, help me. I don�t know how to continue with my job.
Yahoo! M�viles
Personaliza tu m�vil con tu logo y melod�a favorito
Yahoo! M�viles
Personaliza tu m�vil con tu logo y melod�a favorito
