Re: Simple Usage of xindice

Lahiru Gunathilake <[email protected]> Fri, 25 Feb 2011 12:24:41 +0530
Newsgroups gmane.text.xml.xindice.user
Message-ID <[email protected]>
--20cf30025c58f33beb049d15cd35
Content-Type: text/plain; charset=ISO-8859-1

Hi Natalia,

Thank you very much for your response, I was able to run the samples
successfully and I am understanding things gradually, hopefully I think I am
in a position to use xindice for my PoC.

Thanks inadvance
Lahiru

On Fri, Feb 25, 2011 at 5:25 AM, Natalia Shilenkova
<[email protected]>wrote:

> On Feb 22, 2011, at 9:07 AM, Lahiru Gunathilake wrote:
>
> Hi all,
>
> 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.
>
> .
> 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.
>
> 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
>
> --
> Lahiru Gunathilake
> Senior Software Engineer - WSO2 Inc. www.wso2.com
>
> Email:[email protected] Blog: www.lahiru.org
> Mobile: +94716381143
>
> Lean . Enterprise . Middleware
>
>
>


-- 
Lahiru Gunathilake
Senior Software Engineer - WSO2 Inc. www.wso2.com

Email:[email protected] Blog: www.lahiru.org
Mobile: +94716381143

Lean . Enterprise . Middleware

--20cf30025c58f33beb049d15cd35
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hi Natalia,<div><br></div><div>Thank you very much for your response, I was=
 able to run the samples successfully and I am understanding things gradual=
ly, hopefully I think I am in a position to use xindice for my PoC.</div>
<div><br></div><div>Thanks inadvance</div><div>Lahiru<br><br><div class=3D"=
gmail_quote">On Fri, Feb 25, 2011 at 5:25 AM, Natalia Shilenkova <span dir=
=3D"ltr">&lt;<a href=3D"mailto:[email protected]">[email protected]=
</a>&gt;</span> wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div style=3D"word-wrap:break-word"><div><d=
iv><div class=3D"im"><div>On Feb 22, 2011, at 9:07 AM, Lahiru Gunathilake w=
rote:</div>
<br><blockquote type=3D"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 docu=
mentation I was able to start the Xindice with Jetty and after setting up t=
he classpaths in the examples I was able to execute the samples but I am ge=
tting following error when run the samples.</div>

<div><br></div><div><div>.</div><div>trying to register database</div><div>=
Exception in thread &quot;main&quot; org.apache.xindice.util.XindiceExcepti=
on: DatabaseManager.getCollection(xmldb:xindice:///db/addressbook) returned=
 null.</div>

<div><span style=3D"white-space:pre-wrap">	</span>at org.apache.xindice.exa=
mples.AbstractExample.getCollection(AbstractExample.java:57)</div></div></b=
lockquote><div><br></div></div>Apparently, the collection /db/addressbook c=
annot 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>
<div class=3D"im"><br><blockquote type=3D"cite"><div><div>Am I doing someth=
ing 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&#39;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></div>I would recommend=
 to take a look at Xindice Developer Guide [2] (it mentions running example=
s as well) and checking source code for examples and command tool.<br>
<div><br></div>[1]=A0<a href=3D"http://xml.apache.org/xindice/1.2/guide-too=
ls.html" target=3D"_blank">http://xml.apache.org/xindice/1.2/guide-tools.ht=
ml</a></div><div>[2]=A0<a href=3D"http://xml.apache.org/xindice/1.2/guide-d=
eveloper.html" target=3D"_blank">http://xml.apache.org/xindice/1.2/guide-de=
veloper.html</a></div>
<div><br></div><div>Regards,</div><div>Natalia</div><div class=3D"im"><div>=
<br><blockquote type=3D"cite"><div><div>Regards</div><div>Lahiru</div><br>-=
- <br>Lahiru Gunathilake<br>Senior Software Engineer - WSO2 Inc. <a href=3D=
"http://www.wso2.com/" target=3D"_blank">www.wso2.com</a><br>

<br><a href=3D"mailto:Email%[email protected]" target=3D"_blank">Email:lahi=
[email protected]</a> Blog: <a href=3D"http://www.lahiru.org/" target=3D"_blank">=
www.lahiru.org</a><br>Mobile: +94716381143<br><br>Lean . Enterprise . Middl=
eware<br>
<br>
</div>
</blockquote></div><br></div></div></div></blockquote></div><br><br clear=
=3D"all"><br>-- <br>Lahiru Gunathilake<br>Senior Software Engineer - WSO2 I=
nc. <a href=3D"http://www.wso2.com">www.wso2.com</a><br><br><a href=3D"mail=
to:Email%[email protected]">Email:[email protected]</a> Blog: <a href=3D"http=
://www.lahiru.org">www.lahiru.org</a><br>
Mobile: +94716381143<br><br>Lean . Enterprise . Middleware<br><br>
</div>

--20cf30025c58f33beb049d15cd35--