You are viewing a plain text version of this content. The canonical link for it is here.
Posted to xindice-dev@xml.apache.org by Wap Brunei <br...@hotmail.com> on 2001/12/29 02:37:10 UTC

URI setting

I started the Xindice and the message as below

Xindice 1.0rc1 <DarkHorse>

Database : 'db' initizing
Script   : 'GET' added to script storage
Service  : 'db' started
Service  : 'GopherServer' started @ gopher://ken2:4070/
Service  : 'HTTPServer' started @ http://ken2:4080/
Service  : 'APIService' started

Server Running

When i try to run the following code

Class c = Class.forName(driver);
Database database = (Database) c.newInstance();
DatabaseManager.registerDatabase(database);
System.out.println(database.acceptsURI("xmldb:dbxml:///db"));
col =  DatabaseManager .getCollection("xmldb:dbxml:///db/", usr, pass);

it give the error message

false <-- database.acceptsURI return false

org.xmldb.api.base.XMLDBException: A connection to the Database instance 
'db' could not be created. Error:

	at org.dbxml.client.xmldb.DatabaseImpl.init(DatabaseImpl.java:378)

	at org.dbxml.client.xmldb.DatabaseImpl.getCollection(DatabaseImpl.java:197)

	at org.xmldb.api.DatabaseManager.getCollection(DatabaseManager.java:194)

	at dbxmltest2.test.setUp(test.java:89)

	at dbxmltest2.test.main(test.java:192)

What can i solve this problem?

_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


Re: URI setting

Posted by "Mark J. Stang" <ma...@earthlink.net>.
I did a quick look to see what I am using...

       _collectionName = "xmldb:dbxml:///db/" + collectionName;

Mine ends up being "xmldb:dbxml:///db/addressbook"

Where _collectionName is a String and collectionName is passed in.
I am currently doing all of my testing with the addressbook collection.
I am about to branch out...

The collection specified in Example1 may not have been created as
part of the default installation...

Mark

"Mark J. Stang" wrote:

> I believe you need a collection name.   The /db is the database or
> something like that and then you need to specify which collection
> in the db you want.   Try "addressbook", I think it is there as
> part of the installation.   See Example1.java for an example.
>
> Mark
>
> Wap Brunei wrote:
>
> > I started the Xindice and the message as below
> >
> > Xindice 1.0rc1 <DarkHorse>
> >
> > Database : 'db' initizing
> > Script   : 'GET' added to script storage
> > Service  : 'db' started
> > Service  : 'GopherServer' started @ gopher://ken2:4070/
> > Service  : 'HTTPServer' started @ http://ken2:4080/
> > Service  : 'APIService' started
> >
> > Server Running
> >
> > When i try to run the following code
> >
> > Class c = Class.forName(driver);
> > Database database = (Database) c.newInstance();
> > DatabaseManager.registerDatabase(database);
> > System.out.println(database.acceptsURI("xmldb:dbxml:///db"));
> > col =  DatabaseManager .getCollection("xmldb:dbxml:///db/", usr, pass);
> >
> > it give the error message
> >
> > false <-- database.acceptsURI return false
> >
> > org.xmldb.api.base.XMLDBException: A connection to the Database instance
> > 'db' could not be created. Error:
> >
> >         at org.dbxml.client.xmldb.DatabaseImpl.init(DatabaseImpl.java:378)
> >
> >         at org.dbxml.client.xmldb.DatabaseImpl.getCollection(DatabaseImpl.java:197)
> >
> >         at org.xmldb.api.DatabaseManager.getCollection(DatabaseManager.java:194)
> >
> >         at dbxmltest2.test.setUp(test.java:89)
> >
> >         at dbxmltest2.test.main(test.java:192)
> >
> > What can i solve this problem?
> >
> > _________________________________________________________________
> > MSN Photos is the easiest way to share and print your photos:
> > http://photos.msn.com/support/worldwide.aspx


Re: URI setting

Posted by "Mark J. Stang" <ma...@earthlink.net>.
I believe you need a collection name.   The /db is the database or
something like that and then you need to specify which collection
in the db you want.   Try "addressbook", I think it is there as
part of the installation.   See Example1.java for an example.

Mark

Wap Brunei wrote:

> I started the Xindice and the message as below
>
> Xindice 1.0rc1 <DarkHorse>
>
> Database : 'db' initizing
> Script   : 'GET' added to script storage
> Service  : 'db' started
> Service  : 'GopherServer' started @ gopher://ken2:4070/
> Service  : 'HTTPServer' started @ http://ken2:4080/
> Service  : 'APIService' started
>
> Server Running
>
> When i try to run the following code
>
> Class c = Class.forName(driver);
> Database database = (Database) c.newInstance();
> DatabaseManager.registerDatabase(database);
> System.out.println(database.acceptsURI("xmldb:dbxml:///db"));
> col =  DatabaseManager .getCollection("xmldb:dbxml:///db/", usr, pass);
>
> it give the error message
>
> false <-- database.acceptsURI return false
>
> org.xmldb.api.base.XMLDBException: A connection to the Database instance
> 'db' could not be created. Error:
>
>         at org.dbxml.client.xmldb.DatabaseImpl.init(DatabaseImpl.java:378)
>
>         at org.dbxml.client.xmldb.DatabaseImpl.getCollection(DatabaseImpl.java:197)
>
>         at org.xmldb.api.DatabaseManager.getCollection(DatabaseManager.java:194)
>
>         at dbxmltest2.test.setUp(test.java:89)
>
>         at dbxmltest2.test.main(test.java:192)
>
> What can i solve this problem?
>
> _________________________________________________________________
> MSN Photos is the easiest way to share and print your photos:
> http://photos.msn.com/support/worldwide.aspx