Thanks for the numerous answers!
OK, CORBA is not in 1.1 anymore, I have to use org.apache.xindice.client.xmldb.xmlrpc.DatabaseImpl in my Java, so that something like...
<CODE>
import org.xmldb.api.DatabaseManager; import org.xmldb.api.base.Collection; import org.xmldb.api.base.Database; import org.xmldb.api.modules.CollectionManagementService;
public class CreateCollection {
public final static String URI = "xmldb:xindice://localhost:8080/";
(...)
String driver = "org.apache.xindice.client.xmldb.xmlrpc.DatabaseImpl";
Class cl = Class.forName(driver);
Database database = (Database) cl.newInstance();
DatabaseManager.registerDatabase(database);
Collection root = DatabaseManager.getCollection(URI + "/db");
CollectionManagementService mgtService =(CollectionManagementService) root.getService("CollectionManagementService", "1.0");
Collection col = mgtService.createCollection("acollection");
(...)
</CODE> ...should work.
Since I don't seem to get _anything_ to work, could someone paste me some code that creates a collection in Xindice 1.1 under tomcat? Very, very simple, no bells & whistles, just create a collection under the root element. That would probably help a lot, since I now guess my problem might as well lie elsewhere.
Thanks,
Kai
On Friday 05 Sep 2003 1:15 pm, Mario Cormier wrote:
CORBA messages humm? Well I know 1.0 used CORBA as the "core" protocol to access the database, but as far as I could see, not only is it not the core protocol in 1.1, it's not even there anymore.
So my guess is that you tool is using an older client library which simply doesn't talk the same language as the new database. I think you will need a new version of that tool in order to access 1.1 databases.
Hope this helps!
Mario
Kai Wörner wrote:
If you're now using 1.1 as a servlet the paths to the DB change to something like:
xmldb:xindice://localhost:8080/db/
YAB and Java (I'm trying it with the CreateCollection.java-example from http://xml.apache.org/xindice/guide-developer.html#N101B5) give me the same error:
org.xmldb.api.base.XMLDBException: A connection to the Database instance 'db' could not be created. Error: http://localhost:8080/db_bootstrap.ior
The (decoded) .ior-file seems to read: _IIOP_ParseCDR: byte order BigEndian, repository id <IDL:org/apache/xindice/client/corba/db/Database:1.0>, 1 profile _IIOP_ParseCDR: profile 1 is 120 bytes, tag 0 (INTERNET), BigEndian byte order (iiop.c:parse_IIOP_Profile): bo=BigEndian, version=1.2, hostname=wetzlar.multilingua.uni-hamburg.de, port=2054, object_key=<.OO.8..f....POA.k...> (iiop.c:parse_IIOP_Profile): encoded object key is <%00OO%018?Þf÷%00% 00%00POA%FEk?¯œ> (iiop.c:parse_IIOP_Profile): non-native cinfo is <iiop_1_2_1_%2500OO%25018?Þf÷%2500%2500%2500POA% [EMAIL PROTECTED]> object key is <#00OO#018#84#DEf#F7#00#00#00POA#FEk#8F#AF#BD>; no trustworthy most-specific-type info; unrecognized ORB; reachable with IIOP 1.2 at host "wetzlar.multilingua.uni-hamburg.de", port 2054
Does that ring a bell with anyone?
Herrner