xindiceadmin add_collection -c /db -n data
and then insert the following new code in APIExample.java
// Run the examples
listCollections(col);col = DatabaseManager.getCollection("xmldb:xindice:///db/data"); // new code!!!
String oid = insertDocument(col);
things appear to work.
A committer may wish to do this, as it kinda stumped this newbie for a while. Thanks!
At 01:52 PM 1/8/02 -0800, you wrote:
Hi folks,
The first issue is that the line
DatabaseManager.getCollection("xmldb:dbxml:///db/root/ocs");
apparently should be changed to
DatabaseManager.getCollection("xmldb:xindice:///db/system");
in order to avoid an early demise due to a null pointer exception.
The next issue is that after the above change, the console output is
Database Name db
SysAccess
SysGroups
SysObjects
SysConfig
SysUsers
SysSymbols
Error creating document '<?xml version="1.0"?> <test>Hello</test>'
Document Key: test
Retrieving Document using getResource
test
ERROR : org.xmldb.api.base.XMLDBException: Collection No IndexManager
org.xmldb.api.base.XMLDBException: Collection No IndexManager
org.xmldb.api.base.XMLDBException org.apache.xindice.core.FaultCodes.createXMLDBException(java.lang.Exception)
FaultCodes.java:239
org.xmldb.api.base.Resource org.apache.xindice.client.xmldb.CollectionImpl.getResource(java.lang.String)
CollectionImpl.java:404
void org.apache.xindice.examples.APIExample.retrieveDocument(org.xmldb.api.base.Collection, java.lang.String)
APIExample.java:157
void org.apache.xindice.examples.APIExample.main(java.lang.String[])
APIExample.java:99
I can keep plugging along, as its' a great way to learn the code, but you folks probably know what's up right away...
Thanks!
