xml-xindice-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laxma Reddy Dendi <xindice_...@yahoo.com>
Subject Re: embedding xindice inside a specific webapp
Date Wed, 08 Sep 2004 22:24:10 GMT
Thanks for your reply Vadim.
I did exactly the same.
I can see in the tomcat startup that my "db" is
pointing to the new location. Everything looks great.

but when i try to list the collections using 
"xindice" command, (xindice lc -c
xmldb:xindice://localhost:8080/db) i am getting the
following error: XMLDB Exception 0: Cannot communicate
with the server: http://localhost:8080/xindice

(I did not changed the "xml-rpc" part in system.xml)
(i also tried xmldb:xindice://localhost:8080/myapp/db)

also when i try the following code
==================================================
<%@ page import = "org.xmldb.api.base.*" %> 
<%@ page import = "org.xmldb.api.modules.*" %> 
<%@ page import = "org.xmldb.api.*" %> 
<%@ page import =
"org.apache.xindice.client.xmldb.services.*" %> 
<%@ page import = "org.apache.xindice.xml.dom.*" %> 

<%

  Collection col = null;
  try {
    String driver =
"org.apache.xindice.client.xmldb.DatabaseImpl";
    Class c = Class.forName(driver);

    Database database = (Database) c.newInstance();
    DatabaseManager.registerDatabase(database);
    String uri = "xmldb:xindice://localhost:8080/db";
    col =
      DatabaseManager.getCollection(uri);

    String collectionName = "test";
    CollectionManager service =
      (CollectionManager)
col.getService("CollectionManager", "1.0");

    // Build up the Collection XML configuration.
    String collectionConfig =
      "<collection compressed=\"true\" " +
      "            name=\"" + collectionName + "\">" +
      "   <filer
class=\"org.apache.xindice.core.filer.BTreeFiler\"/>"
+
      "</collection>";

    service.createCollection(collectionName,
      DOMParser.toDocument(collectionConfig));

    out.print("Collection " + collectionName + "
created.");
  }
  catch (XMLDBException e) {
    out.print("XML:DB Exception occured " +
e.getMessage());
  }
  finally {
    if (col != null) {
      col.close();
    }
  }
  
%>
================================================
i am getting the same error. 

Am I missing something here.? or doing wrong.?

please advise.


regards,
laxma



--- Vadim Gritsenko <vadim@reverycodes.com> wrote:

> Laxma Reddy Dendi wrote:
> 
> >    Instead of deploying xindice.war under webapps,
> I
> > want to integrate xindice with my existing webapp.
> > 
> >    So far I figured that I need to change the
> > server.xml that comes with xindice and put it in
> my
> 
> What server.xml? I don't see any.
> 
> 
> > webapp's WEB-INF  folder. (also i need to put the
> > jar's into my webapp's lib folder)
> 
> Yes.
> 
> 
> >    Please let me know what else I need to do.
> 
> Same as for merging any other webapp:
> WEB-INF/classes, WEB-INF/web.xml, 
> all other resources within WEB-INF folder.
> 
> 
> Vadim
> 
> 
> 



		
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

Mime
View raw message