Hi,
I am xindice new bie running xindice 1.1.b3 on tomcat 4.1.24. I have installed the webapp version of xindice aling with the standalone server of it. But I usually use the embedded version of it. I have created a utility program for adding deleting documents from the database. But on trying to run the code I get an error
XML:DB Exception occured 1
org.xmldb.api.base.XMLDBException: A connection to the Database instance 'localhost:6669' could not be created. Error: Connection refused
The main excerpt of the code is as follows
import org.xmldb.api.base.*;
import org.xmldb.api.modules.*;
import org.xmldb.api.*;
import java.util.Vector;
import java.io.FileInputStream;
import java.io.File;
import java.io.IOException;
import org.w3c.dom.Node;
import org.apache.xindice.client.xmldb.embed.DatabaseImpl; import org.apache.xindice.client.xmldb.services.CollectionManager; import org.apache.xindice.xml.dom.DocumentImpl; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.xmldb.api.DatabaseManager; import org.xmldb.api.base.Collection; import org.xmldb.api.base.Resource; import org.xmldb.api.base.XMLDBException; import org.xmldb.api.modules.CollectionManagementService;
public class XindiceUtils{
private Collection col = null;
private static final String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
private static final String collectionbase = "xmldb:xindice-embed:///db/";
private Database database = null;
private DatabaseManager dbman = null;
public XindiceUtils(){ try {dbman = new DatabaseManager();
Class c = Class.forName(driver);
database = (Database) c.newInstance();
dbman.registerDatabase(database);
} catch (Exception e) {e.printStackTrace(System.err);
}
}
When i try to run xindice ac -c xmldb:xindice//localhost:6669/db -n dummy
It creates the collection flawlessly and it can be seen on trying the url http://locahost:6669/xindice
Does any one now what I am doing wrong here.
Regards,
Somesh
_________________________________________________________________
Easiest Money Transfer to India. Send Money To 6000 Indian Towns. http://go.msnserver.com/IN/42198.asp Easiest Way To Send Money Home!
