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 Stephan Jones <st...@redpillconsulting.com> on 2003/07/16 13:01:13 UTC

getting an error when service is starting up

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




RE: getting an error when service is starting up

Posted by Stephan Jones <st...@redpillconsulting.com>.
I was using the CVS package xml-xindice (linked to from the xml project
site)
These files were building as 1.1b2

When I use the http://cvs.apache.org/dist/xindice/b2/ Kevin pointed me to I
get even less results, though I get no error on start-up

The same code with the new http://cvs.apache.org/dist/xindice/b2/ files give
this output.

about to try to make the collection
serviceLocation=</Xindice/>
in finnaly
XML:DB back in Action Forward - caught an exception

No collection is created in this case.


-----Original Message-----
From: Kevin Ross [mailto:Kevin.Ross@iVerticalLeap.com]
Sent: July 16, 2003 8:00 AM
To: xindice-users@xml.apache.org
Subject: RE: getting an error when service is starting up

Are you working with b2?

http://cvs.apache.org/dist/xindice/b2/

-Kevin Ross

-----Original Message-----
From: Stephan Jones [mailto:stevej@redpillconsulting.com]
Sent: Wednesday, July 16, 2003 5:01 AM
To: xindice-users@xml.apache.org
Subject: getting an error when service is starting up

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





RE: getting an error when service is starting up

Posted by Kevin Ross <Ke...@iVerticalLeap.com>.
Are you working with b2?

http://cvs.apache.org/dist/xindice/b2/

-Kevin Ross

-----Original Message-----
From: Stephan Jones [mailto:stevej@redpillconsulting.com] 
Sent: Wednesday, July 16, 2003 5:01 AM
To: xindice-users@xml.apache.org
Subject: getting an error when service is starting up

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