For people who are having problems with the code found in the DevX article on Xindice when they use Xindice 1.1 instead of 1.0, the following should be useful.

Instead of using the following to embedded a database instance...

c = Class.forName("org.apache.xindice.client.xmldb.DatabaseImpl");
database = (Database) c.newInstance();
DatabaseManager.registerDatabase(database);

Use the following...

Class c = Class.forName("org.apache.xindice.client.xmldb.embed.DatabaseImpl");
database = (Database) c.newInstance();
DatabaseManager.registerDatabase(database);

Instead of using the following to collection management...

CollectionManager service = (CollectionManager) col.getService("CollectionManager", "1.0");

Use the following...

CollectionManagementService service = (CollectionManagementService) col.getService("CollectionManagementService", "1.0");
  • No labels