Hi Upayavira,
OK, I added the line of code:System.setProperty("xindice.configuration",
"path-to-system.xml")
where path-to-system.xml = "/home/willipa5/xindice-1.1b3/config/system.xml".
When I re-ran my application the debug output changed to:
Jan 20, 2004 11:20:06 AM org.apache.xindice.client.xmldb.embed.DatabaseImpl
loadConfiguration
INFO: Specified configuration file:
'/home/willipa5/xindice-1.1b3/config/system.xml'
Jan 20, 2004 11:20:08 AM org.apache.xindice.core.Database setConfig
INFO: Database points to /home/willipa5/xindice-1.1b3/config/./db
Jan 20, 2004 11:20:09 AM org.apache.xindice.core.Collection setObject
INFO: [main] '/db/system/SysSymbols' Set object system_SysConfig
Jan 20, 2004 11:20:09 AM org.apache.xindice.core.Collection setDocument
INFO: [main] '/db/system/SysConfig' Set document database.xml
Jan 20, 2004 11:20:09 AM org.apache.xindice.core.Collection setObject
INFO: [main] '/db/system/SysSymbols' Set object meta_Metas
Jan 20, 2004 11:20:09 AM org.apache.xindice.core.Collection setObject
INFO: [main] '/db/system/SysSymbols' Set object meta_Metas_system_SysConfig
Jan 20, 2004 11:20:10 AM org.apache.xindice.core.Database setConfig
INFO: Meta information initialized
I don't see any obvious errors or problems. Now, however when I try to
access the collection the following debug output is given:
***** Start of NXD Test *****
Input file name: /home/willipa5/nxdperftest/TestMessage-small.xml
Input file size: 10294 bytes.
File loaded. Beginning test.
*** Starting Store test with 0 entries in database...
Storing 1000 entries - Jan 20, 2004 11:20:11 AM
org.apache.xindice.core.Collection insertDocument
INFO: [main] '/db' Insert document: Message_0
Unable to add message: Unable to add item do database: Invalid resource:
Message_0: This Collection 'db' cannot store Documents
Unable to retrieve message: Unable to retrieve document: Resource not
available: Message_-500: This Collection 'db' cannot store Documents
Jan 20, 2004 11:20:11 AM org.apache.xindice.core.Collection queryCollection
INFO: [main] '/db' Query collection, query
/Envelope[contains(Message/Body/Part/Content,"query")]/EnvID/MsgID
Jan 20, 2004 11:20:11 AM org.apache.xindice.core.Collection queryCollection
INFO: [main] '/db' Query collection, query
/Envelope[contains(Routing/Recipients/Recipient/NativeAddress,"Butters")]/En
vID/MsgID
*** End Store test.
It looks like the debug output is saying that I cannot store documents. I
am very confused about how to "prepare" the collection for use and how to
tell xindice where the collection is located?!?
Again, any help you can provide will be greatly appreciated!
Paul Willis
NGIT
-----Original Message-----
From: Upayavira [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 20, 2004 10:58 AM
To: [email protected]
Subject: Re: Config File Questions
Willis, Paul A. wrote:
>Hello Everyone,
>
>When I try to start my java application, which tries to connect to
>xindice-1.1b3 I get the following debug output:
>
>Jan 20, 2004 9:29:11 AM org.apache.xindice.client.xmldb.embed.DatabaseImpl
>loadConfiguration
>INFO: No configuration file specified, going with the default configuration
>Jan 20, 2004 9:29:13 AM org.apache.xindice.client.xmldb.embed.DatabaseImpl
>loadConfiguration
>WARNING: The database configuration file is not specified and there was no
>xindice.db.home property set, so Xindice was unable to determine a database
>location. Database will be created relative to the current directory.
>Jan 20, 2004 9:29:14 AM org.apache.xindice.core.Database setConfig
>INFO: Database points to /export/home/willipa5/nxdperftest/db
>
>
>I do know where the database configuration file is located or what info it
>requires. Any help would be greatly appreciated
>
>Paul Willis
>NGIT
>
>
There should be a sample file in xml-xindice/config/system.xml. You
should refer to that with a system property:
-dxindice.configuration=<path to system.xml>
or, in your code, before you initialise your database:
System.setProperty("xindice.configuration", "path-to-system.xml");
In that file is the path to your database. You can also specify the
database path with a system property of "xindice.db.home", although I've
never used it.
Regards, Upayavira