My env is
tomcat 4.1
xindice 1.1b
jdk 1.4.2
struts 1.1

I get the following message when tomcat starts.

16-Jul-2003 3:51:44 AM org.apache.xindice.core.Database setConfig
INFO: Database points to c:\db
16-Jul-2003 3:51:45 AM org.apache.xindice.core.filer.BTreeFiler writeRecord
WARNING: java.lang.IndexOutOfBoundsException
16-Jul-2003 3:51:45 AM org.apache.xindice.server.XindiceServlet init
INFO: Database successfully started

Then I can add a collection but its throws an error everytime.
This is my example coppied from the examples given.

     Collection col = null;
      try {
         String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
         Class c = Class.forName(driver);
System.out.println("Class defined");
         Database database = (Database) c.newInstance();
         DatabaseManager.registerDatabase(database);
         col =
            DatabaseManager.getCollection("xmldb:xindice:///db/");
System.out.println("Col defined" + col);
         String collectionName = "eCACollection";
System.out.println("collectionName = " + collectionName );
         CollectionManager service =
            (CollectionManager) col.getService("CollectionManager", "1.0");
System.out.println("CollectionManager");
         // Build up the Collection XML configuration.
         String collectionConfig =
            "<collection compressed=\"true\" name=\"" + collectionName +
"\">" +
            "   <filer class=\"org.apache.xindice.core.filer.BTreeFiler\"
gzip=\"true\"/>" +
            "</collection>";

         service.createCollection(collectionName,
               DOMParser.toDocument(collectionConfig));

         System.out.println("Collection " + collectionName + " created.");
      }
      catch (XMLDBException e) {
         System.out.println("XML:DB Exception occured " + e.errorCode + " "
+ e.getMessage());
         System.err.println("XML:DB Exception occured " + e.errorCode + " "
+ e.getMessage());
      }
      finally {
         if (col != null) {
            col.close();
         }
      }

The output is thus

serviceLocation=</Xindice/>
after service call CollectionManager
16-Jul-2003 3:52:08 AM org.apache.xindice.core.CollectionManager
createCollection
INFO: Created a new collection named 'eCAConfiguration'
XML:DB Exception occured 201 Cannot create child collection
in finnaly

As you can see  the servicecreateCollection never only partially completes ?
( that's the way I see it)
The directory is created under c:\db\ all else seems to be hookay.


Any help would be grand. I've been going around in circles



Reply via email to