[jsword-devel] jsword-devel Digest, Vol 46, Issue 15

DM Smith dmsmith555 at yahoo.com
Thu Apr 3 03:02:33 MST 2008


Yiguang,
I'm glad Peter was able to give you the right answer regarding the  
placement of the modules and also of their indexes.

I'm concerned that JSword is running via tomcat as root. This appears  
to give JSword root permissions. Not a good idea.

Alternatively, if you can set the Java properties user.home,  
sword.home or jsword.home, you can influence where JSword looks for  
it's files.
user.home is where JSword thinks the user's home directory is.
sword.home is where JSword thinks the user's writable module directory  
is.
jsword.home is where JSword thinks the user's writable program  
directory is.
If the latter two are not defined or are not writable, then JSword  
will use a platform dependent determination of the module and program  
homes.

On Unix, it would be ~/.sword and ~/.jsword respectively.

As Peter noted, JSword is exceptionally good at finding many SWORD  
module directories.

The SWORD architecture has the index co-located with the module's  
files. We didn't do this because in many cases these locations are  
shared and not writable. So we put them in the JSword writable area.  
Because Lucene (in Java) is so far ahead of CLucene and because JSword  
uses different analyzers, JSword and SWORD cannot use each others  
indexes.

I'm not sure what you mean by "to get the index build may be through  
standalone java program"? Do you need a fragment to explain how to  
build an index? Or do you want to use BibleDesktop to build the index  
then manually copy it to where it needs to be?

In Him,
	DM



On Mar 29, 2008, at 12:10 AM, Yiguang Hu wrote:

> Thanks Peter.
>
> After I copied the index  under Sword/*  on my windows
> box into the corresponding location on linux the
> search start to work!
>
> I will be just waiting for DM to show me where to get
> the index build may be through a standalone java
> program.
>
> Yiguang
> --- peter <refdoc at gmx.net> wrote:
>
>> Sorry Yiguang,
>>
>> Thsi is beyond me. I think you need to wait until DM
>> is again fully
>> available - one week or so more.
>>
>> The only comment I have is that before you run
>> searches on BD you need
>> to have build the lucene index.
>>
>> I am not sure how you would trigger this in your own
>> scenario, but I
>> think you could simply create those index on a BD
>> installation and then
>> copy them over.
>>
>> They will be in ~/.jsword/lucene/Sword/<book> and
>> can simply be copied IIRC.
>>
>> Peter
>> Yiguang Hu wrote:
>>> Thanks Peter.
>>> I unzipped AB.zip under /root/.sword and I can see
>> the
>>> book name show up on my book selection drop down
>> list.
>>> But when I use that book for search I got the
>>> following semiliar error in the tomcat log. The
>>> directory /root/.jsword/lucene/Sword/AB is empty.
>>> Any input would be appreciated.
>>> Thanks
>>> Yiguang
>>>
>>> INFO: second load failure
>>> java.io.FileNotFoundException: no segments* file
>> found
>>> in
>>>
>>
> org.apache.lucene.store.FSDirectory@/root/.jsword/lucene/Sword/AB:
>>> files:
>>>        at
>>>
>>
> org.apache.lucene.index.SegmentInfos 
> $FindSegmentsFile.run(SegmentInfos.java:516)
>>>        at
>>>
>>
> org.apache.lucene.index.IndexReader.open(IndexReader.java:185)
>>>        at
>>>
>>
> org.apache.lucene.index.IndexReader.open(IndexReader.java:148)
>>>        at
>>>
>>
> org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:48)
>>>        at
>>>
>>
> org 
> .crosswire.jsword.index.lucene.LuceneIndex.activate(LuceneIndex.java: 
> 303)
>>>        at
>>>
>>
> org.crosswire.common.activate.Activator.activate(Activator.java:57)
>>>        at
>>>
>>
> org 
> .crosswire 
> .jsword.index.lucene.LuceneIndex.checkActive(LuceneIndex.java:338)
>>>        at
>>>
>>
> org.crosswire.jsword.index.lucene.LuceneIndex.find(LuceneIndex.java: 
> 200)
>>>        at
>>>
>>
> org.crosswire.jsword.index.query.BaseQuery.find(BaseQuery.java:53)
>>>        at
>>>
>>
> org 
> .crosswire 
> .jsword.index.lucene.LuceneSearcher.search(LuceneSearcher.java:86)
>>>        at
>>>
>>
> org 
> .crosswire 
> .jsword.index.lucene.LuceneSearcher.search(LuceneSearcher.java:76)
>>>        at
>>>
>>
> org.crosswire.jsword.book.basic.AbstractBook.find(AbstractBook.java: 
> 116)
>>>        at
>>>
>>
> org.crosswire.jsword.book.basic.AbstractBook.find(AbstractBook.java: 
> 96)
>>>        at
>>>
>>
> org 
> .crosswire 
> .client 
> .webjsword.SearchController.searchandshow(SearchController.java:243)
>>>        at
>>>
>> sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>> Method)
>>>        at
>>>
>>
> sun 
> .reflect 
> .NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>>>
>>> --- jsword-devel-request at crosswire.org wrote:
>>>
>>>> Send jsword-devel mailing list submissions to
>>>> 	jsword-devel at crosswire.org
>>>>
>>>> To subscribe or unsubscribe via the World Wide
>> Web,
>>>> visit
>>>>
>>>>
>>>
>>
> http://www.crosswire.org/mailman/listinfo/jsword-devel
>>>> or, via email, send a message with subject or
>> body
>>>> 'help' to
>>>> 	jsword-devel-request at crosswire.org
>>>>
>>>> You can reach the person managing the list at
>>>> 	jsword-devel-owner at crosswire.org
>>>>
>>>> When replying, please edit your Subject line so
>> it
>>>> is more specific
>>>> than "Re: Contents of jsword-devel digest..."
>>>>
>>>>
>>>> Today's Topics:
>>>>
>>>>   1. Re: jsword-devel Digest, Vol 46, Issue 12
>>>> (peter)
>>>>
>>>>
>>>>
>>>
>>
> ----------------------------------------------------------------------
>>>> Message: 1
>>>> Date: Fri, 28 Mar 2008 08:47:00 +0000
>>>> From: peter <refdoc at gmx.net>
>>>> Subject: Re: [jsword-devel] jsword-devel Digest,
>> Vol
>>>> 46, Issue 12
>>>> To: J-Sword Developers Mailing List
>>>> <jsword-devel at crosswire.org>
>>>> Message-ID: <47ECB084.50701 at gmx.net>
>>>> Content-Type: text/plain; charset=UTF-8
>>>>
>>>> Bible modules in Linux are in one of two p;laces
>>>> normally
>>>>
>>>> /home/$USER/.sword
>>>>
>>>> or
>>>>
>>>> /usr/share/sword
>>>>
>>>>
>>>> You can simply unzip a module in place and the
>> next
>>>> time jsword or
>>>> libsword is called it will "know" that there is a
>>>> new module.
>>>>
>>>> Peter
>>>>
>>>> DM Smith wrote:
>>>>> Yiguang,
>>>>> I'm on holiday this week and have limited
>> internet
>>>> connectivity. When I
>>>>> get home, I'll take a look at your problem.
>>>>> In Him,
>>>>>    DM
>>>>>
>>>>> Yiguang Hu wrote:
>>>>>> I would really appreciate if some one could
>> help
>>>> me
>>>>>> out here. My intention is to build a web front
>>>> based
>>>>>> on jsword (similar to sword web, I may try to
>>>> modify
>>>>>> sword web to make it work with jsword if that
>>>> would be
>>>>>> easier). My question is how to install Bible on
>>>> linux
>>>>>> without using the Bibledesktop since I don't
>> have
>>>> a
>>>>>> xwindow on the linux (the machie is remote) and
>> I
>>>>>> don't have a xemulator on my desktop either. So
>>>> that
>>>>>> the web application based on jsword could
>> access
>>>> the
>>>>>> bible/book modules.
>>>>>> Thanks
>>>>>> Yiguang
>>>>>>
>>>>>>
>>>>>>> I looked the tomcat log file and found the
>>>>>>> following.
>>>>>>> I check the folders
>> /root/.jsword/lucene/Sword/*
>>>>>>> and found all of them are empty.
>>>>>>>
>>>>>>> Is there any configuration file I should look
>>>> at?
>>>>>>> Do I need to download the bible module files
>>>> and
>>>>>>> put
>>
> === message truncated ===
>
>
>
>       
> ____________________________________________________________________________________
> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
>
> _______________________________________________
> jsword-devel mailing list
> jsword-devel at crosswire.org
> http://www.crosswire.org/mailman/listinfo/jsword-devel





More information about the jsword-devel mailing list