Re: Simple Usage of xindice
Natalia Shilenkova <[email protected]> Thu, 24 Feb 2011 18:55:52 -0500
| Newsgroups | gmane.text.xml.xindice.user |
|---|---|
| Message-ID | <[email protected]> |
--Apple-Mail-6-309489190 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii On Feb 22, 2011, at 9:07 AM, Lahiru Gunathilake wrote: > Hi all, >=20 > I want to use the Xindice to store some XML files and query the data = using XPath. Where can I find a simple instruction on how to do this ? = After going through the documentation I was able to start the Xindice = with Jetty and after setting up the classpaths in the examples I was = able to execute the samples but I am getting following error when run = the samples. >=20 > . > trying to register database > Exception in thread "main" org.apache.xindice.util.XindiceException: = DatabaseManager.getCollection(xmldb:xindice:///db/addressbook) returned = null. > at = org.apache.xindice.examples.AbstractExample.getCollection(AbstractExample.= java:57) Apparently, the collection /db/addressbook cannot be found. You can = create the collection by running a command: bin/xindice ac -c /db -n addressbook For other commands available from command line, please see command-line = tool built-in help (bin/xindice --help) or Xindice Commandline Tool = Guide [1]. > Am I doing something wrong ? I do not bother what mode Xindice is = running since I am working on a PoC, ideally I will be using embedded = Xindice but for the time being I can run with Jetty since it's pretty = much straight forward. >=20 > If you can point me to a good documentation that would be greatful. I would recommend to take a look at Xindice Developer Guide [2] (it = mentions running examples as well) and checking source code for examples = and command tool. [1] http://xml.apache.org/xindice/1.2/guide-tools.html [2] http://xml.apache.org/xindice/1.2/guide-developer.html Regards, Natalia > Regards > Lahiru >=20 > --=20 > Lahiru Gunathilake > Senior Software Engineer - WSO2 Inc. www.wso2.com >=20 > Email:[email protected] Blog: www.lahiru.org > Mobile: +94716381143 >=20 > Lean . Enterprise . Middleware >=20 --Apple-Mail-6-309489190 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii <html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div><div>On Feb 22, 2011, at 9:07 AM, Lahiru Gunathilake wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Hi all,<div><br></div><div>I want to use the Xindice to store some XML files and query the data using XPath. Where can I find a simple instruction on how to do this ? After going through the documentation I was able to start the Xindice with Jetty and after setting up the classpaths in the examples I was able to execute the samples but I am getting following error when run the samples.</div> <div><br></div><div><div>.</div><div>trying to register database</div><div>Exception in thread "main" org.apache.xindice.util.XindiceException: DatabaseManager.getCollection(xmldb:xindice:///db/addressbook) returned null.</div> <div><span class="Apple-tab-span" style="white-space:pre"> </span>at org.apache.xindice.examples.AbstractExample.getCollection(AbstractExample.java:57)</div></div></blockquote><div><br></div>Apparently, the collection /db/addressbook cannot be found. You can create the collection by running a command:</div><div>bin/xindice ac -c /db -n addressbook<br><div><br></div><div>For other commands available from command line, please see command-line tool built-in help (bin/xindice --help) or Xindice Commandline Tool Guide [1].</div><br><blockquote type="cite"><div><div>Am I doing something wrong ? I do not bother what mode Xindice is running since I am working on a PoC, ideally I will be using embedded Xindice but for the time being I can run with Jetty since it's pretty much straight forward.</div > <div><br></div><div>If you can point me to a good documentation that would be greatful.</div></div></blockquote><div><br></div>I would recommend to take a look at Xindice Developer Guide [2] (it mentions running examples as well) and checking source code for examples and command tool.<br><div><br></div>[1] <a href="http://xml.apache.org/xindice/1.2/guide-tools.html">http://xml.apache.org/xindice/1.2/guide-tools.html</a></div><div>[2] <a href="http://xml.apache.org/xindice/1.2/guide-developer.html">http://xml.apache.org/xindice/1.2/guide-developer.html</a></div><div><br></div><div>Regards,</div><div>Natalia</div><div><br><blockquote type="cite"><div><div>Regards</div><div>Lahiru</div><br>-- <br>Lahiru Gunathilake<br>Senior Software Engineer - WSO2 Inc. <a href="http://www.wso2.com /">www.wso2.com</a><br> <br><a href="mailto:Email%[email protected]">Email:[email protected]</a> Blog: <a href="http://www.lahiru.org/">www.lahiru.org</a><br>Mobile: +94716381143<br><br>Lean . Enterprise . Middleware<br><br> </div> </blockquote></div><br></div></body></html> --Apple-Mail-6-309489190--