We run eXist in its own process. It looks like you are trying to run
eXist embedded in your application. I assume you have looked at
The deployment guide mentions needing to pass some system properties
on the command-line (e.g. -Dexist.initdb=true -Dexist.home=.) or
calling database.setProperty("create-database", "true") in order to
initialize the database.
If you are doing both of those, can you provide the exception and
stack trace you are getting.
On Dec 19, 2007 9:45 AM, titash neogi <titash.neogi@...> wrote:
> Hi eXist users,
> Seasons Greetings!
> We have a struts based web-application which was using a SQL database
> earlier to get XML content based on user queries, and display it on
> the browser. We are now planning to move to eXist for our xml db and
> use xquery instead of sql.
> My question is, what is the best way to connect to eXist from a
> servlet? We tried porting the sample code for java application to the
> servlet, and imported all the libs and data folder into our WEB-INF
> folder. But we were unable to connect to eXist.
> Please see below, the code we are using for establishing a connection to exist.
> public static Collection getConnection() throws Exception
> logger.info(" entering getinstance() in dbquery ");
> Class cl = Class.forName("org.exist.xmldb.DatabaseImpl");
> Database database = (Database)cl.newInstance();
> // try to read collection
> Collection col =
> DatabaseManager.getCollection("xmldb:exist:///db", "admin", "");
> return col;
> // shut down the database
> //DatabaseInstanceManager manager = (DatabaseInstanceManager)
> // col.getService("DatabaseInstanceManager", "1.0");
> Any pointers on this would be very helpful and we would appreciate the
> help a lot.
> thanks and regards,
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services
> for just about anything Open Source.
> Exist-open mailing list