xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nina Juliadotter" <nvjul...@it.uts.edu.au>
Subject db_bootstrap.ior???
Date Sat, 17 Apr 2004 11:51:35 GMT
Forgot to mention what OS: this error was on Linux (see below). When I run it on
Windows 2000 or XP Pro, i get

XML:DB Exception occured 1 A connection to the Database instance 'db' could not
be created. Error: http://localhost:8080/db_bootstrap.ior

My source code is:

package nina;

import org.xmldb.api.base.*;
import org.xmldb.api.modules.*;
import org.xmldb.api.*;

public class Xin
{

	public static void main(String[] args) throws Exception
	{
	  Collection col = null;
	  try
	  {
		String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
		Class c = Class.forName(driver);

		Database database = (Database) c.newInstance();
		DatabaseManager.registerDatabase(database);

		String uri = "xmldb:xindice://localhost:8080/db/restaurants";
		col = DatabaseManager.getCollection(uri);

		String xpath = "/restaurant[name='TheBratwurst']";
		XPathQueryService service =
		  (XPathQueryService) col.getService("XPathQueryService", "1.0");
		ResourceSet resultSet = service.query(xpath);
		ResourceIterator results = resultSet.getIterator();
		while (results.hasMoreResources())
		{
		  Resource res = results.nextResource();
		  System.out.println((String) res.getContent());
		}
	  }
	  catch (XMLDBException e)
	  {
		System.err.println("XML:DB Exception occured " + e.errorCode + " " + e.getMessage());
	  } finally
	  {
		if (col != null)
		{
		  col.close();
		}
	  }
    }
}


Could anyone tell me what this mysterious db_bootstrap.ior is? I've seen a couple of
people asking questions on this (on the cocoon-users group), but nobody ever got an
answer. A google search for bootstrap.ior gives me next to nothing. Howcome *nobody*
has had this problem, and what is causing it??? And what am I doing wrong?

Thanks from desperate,
Nina



> Hi everyone,
>
> I've been trying connect to Xindice through Cocoon for a few days now without
> success. I'm running Xindice 1.1b4 as a standalone under Tomcat 5.0. I've got it up
> and running fine, I can access it through xmldb:xindice://localhost:8080/db/testcol
> and add documents and query it and all that.
>
> As I gave up on trying to get Cocoon to connect to it, I used the source code from
>
> http://xml.apache.org/xindice/guide-developer.html#Diving+in+With+an+Example+Program
>
> and changed the details to reflect my database. But when I run it, I get the error:
>
> XML:DB Exception occured 1 A connection to the Database instance 'db' could not be
> created. Error: Connection refused
>
> My uri string is declared as:
>
> String uri = "xmldb:xindice://localhost:8080/db/testcol";
>
> and that's the only thing I have changed from the original code.
>
> Has anyone come across this problem before, by any chance? Any idea what to do?
>
> Cheers,
> Nina
>
>


Mime
View raw message