David Kensche wrote:

Hi,
I'm just replacing my old xindice 1.0 with the newest version from cvs. After moving
some jars hence and forth, this is the farest I get with my own application:


[java] 2003-12-17 18:44:11,014 80 [AWT-EventQueue-0] DEBUG repository.XindiceRepositoryManager - Driver loaded.
[java] 2003-12-17 18:44:11,024 90 [AWT-EventQueue-0] DEBUG repository.XindiceRepositoryManager - DB registered.
[java] 2003-12-17 18:44:11,024 90 [AWT-EventQueue-0] DEBUG repository.XindiceRepositoryManager - rootCollection=xmldb:xindice-embed://localhost:8080/db/MonA



If you use embedded driver, there is no sense in specifying host/port, so url will be xmldb:xindice-embed:///db/MonA



[java] 2003-12-17 18:39:47,105 291 [AWT-EventQueue-0] INFO org.apache.xindice.client.xmldb.embed.DatabaseImpl - No configuration file specified, going with the default configuration
[java] 2003-12-17 18:39:47,125 311 [AWT-EventQueue-0] WARN org.apache.xindice.xml.dom.DOMParser - ignored exception
[java] org.xml.sax.SAXNotSupportedException: Feature: http://xml.org/sax/features/external-general-entities
[java] at org.apache.crimson.parser.XMLReaderImpl.setFeature(XMLReaderImpl.java:211)




You are supposed to use xerces, and not crimson. Crimson is really old XML parser which does not support a lot of features / standards.

If you are using jdk1.4, this is easily done by specifying property in command line:
-Djava.endorsed.dirs=<path to dir with xerces, xml-apis, xalan jars>


You can see latest xindice CVS for an example of how this can be achieved.

...

This is my code:
String driver = "org.apache.xindice.client.xmldb.DatabaseImpl";
Class c = Class.forName(driver);
// Get the database interface from the driver. This is the concrete
// Database implementation provided by xindice conforming the
// XML:DB Database API.
logger.debug("Loading driver.");
Database database = (Database)c.newInstance();
logger.debug("Driver loaded.");
// Register this database-driver to the concrete DB Manager of the XML:DB API
DatabaseManager.registerDatabase(database);
logger.debug("DB registered.");
rootCollection = "xmldb:xindice-embed://"+
((host != null)?host:"localhost")+":"+
((port != null)?port:"4080")+"/"+


4080 port was used for CORBA in 1.0; it won't be used with 1.1, unless you deploy xindice in tomcat and configure tomcat to listen on 4080.


     ((db  != null)?db:"db")+"/MonA";
     logger.debug("rootCollection="+rootCollection);

     Collection col = DatabaseManager.getCollection(rootCollection);

Does anybody know, how to fix this exception? The last line creates the exception.


See answer above :)


The collection exists. I created it via command line.
And: where do I have to put which configuration file when I don't want the db in
my working directory?


There are system properties controlling this:
xindice.configuration - specifies config.xml filename
xindice.db.home - used to resolve db home if path in config.xml is relative.



Vadim






Reply via email to