Hello, I am using/want to use Xindice in my diploma thesis. I am, like Yusuf, new to Xindice and have a similar problem.
I am also using the xindice-1.1b3.war with Tomcat - as part of the JWSDP-1.3, with JDK 1.4.2_03 on Windows98. I renamed the WAR-file to xindice.war and succeeded in accessing the database through "http://localhost:8080/xindice/?/db". I succeeded in creating collections with my Java application (see source code below), but neither can I drop the collections (XMLDBException: cannot remove Collection) nor add documents to them. After several attempts and restarting Tomcat, xindice did not work any more (java.lang.OutOfMemoryError). The complete source code (for testing, I removed one part or the other from the code; dbURI is "xmldb:xindice://localhost:8080/db"): // ---------------- Class c = Class.forName(dbDriver); Database database = (Database)c.newInstance(); DatabaseManager.registerDatabase(database); if (DatabaseManager.getCollection(dbURI + "/" + dbCollection) == null) { collection = DatabaseManager.getCollection(dbURI); CollectionManager service = (CollectionManager)collection.getService("CollectionManager", "1.0"); String collectionConfig ="<collection compressed=\"false\" name=\"" + dbCollection + "\">" + " <filer class=\"org.apache.xindice.core.filer.BTreeFiler\" gzip=\"false\"/>" + "</collection>"; service.createCollection(dbCollection, DOMParser.toDocument(collectionConfig) ); } else { collection = DatabaseManager.getCollection(dbURI); CollectionManager service = (CollectionManager)collection.getService("CollectionManager", "1.0"); service.dropCollection(dbCollection); } collection = DatabaseManager.getCollection(dbURI + "/" + dbCollection); String[] resources = collection.listResources(); for (int i = 0; i < resources.length; i++) collection.removeResource(collection.getResource(resources[i] ) ); XMLResource update = (XMLResource)collection.createResource(updateFile, "XMLResource"); update.setContentAsDOM(document); collection.storeResource(update); // ------------- I would be grateful, if somebody could help me with this problem. Thank you very much in advance, sincerely Lars Beuth -- +++ NEU bei GMX und erstmalig in Deutschland: T�V-gepr�fter Virenschutz +++ 100% Virenerkennung nach Wildlist. Infos: http://www.gmx.net/virenschutz
