Ok, I have checked the archives, tried some of the things there, and tried both JDK1.4 and JDK1.3 with my example. I keep getting:

org.apache.xindice.client.corba.db.APIException: IDL:org/apache/xindice/client/c
orba/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 TestUpdate.main(TestUpdate.java:26)
Exception in thread "main" org.xmldb.api.base.XMLDBException: Query Compilation
Error
at org.apache.xindice.core.FaultCodes.createXMLDBException(FaultCodes.ja
va:239)
at org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.upda
teResult(XUpdateQueryServiceImpl.java:170)
at org.apache.xindice.client.xmldb.services.XUpdateQueryServiceImpl.upda
te(XUpdateQueryServiceImpl.java:185)
at TestUpdate.main(TestUpdate.java:26)


I am actually using Cocoon and xindice, but wrote a little test program that exhibits the same problem. It is attached. I know that the collection and everything is setup fine as I can query it fine. I just can't seem to get by this xupdate problem.

Thanks,

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

public class TestUpdate {

        public static void main( String args[] ) throws Exception {

                Collection col = null;

                Database database = (Database)(Class.forName( 
"org.apache.xindice.client.xmldb.DatabaseImpl" ).newInstance());
                DatabaseManager.registerDatabase( database );
                col = DatabaseManager.getCollection( 
"xmldb:xindice:///db/Auctions" );
                System.out.println( "Got the collection" );
                String xupdate = 
                        "<xu:modifications version='1.0' 
xmlns:xu='http://www.xmldb.org/xupdate'>" +
                                "<xu:update select='/Auction[1]'>" +
                                        "<ID>001</ID>" +
                                        "<User>Irv</User>" +
                                        "<Bid>45</Bid>" +
                                        "<Description>Test</Description>" +
                                "</xu:update>" +
                        "</xu:modifications>";
                XUpdateQueryService service = 
                        (XUpdateQueryService)(col.getService( 
"XUpdateQueryService", "1.0" ));
                service.update( xupdate );
        }
}

Reply via email to