lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Biswas, Goutam_Kumar" <Goutam-Kumar-Bis...@deshaw.com>
Subject RE: Index-file locking while searching?
Date Fri, 28 Feb 2003 08:00:08 GMT
Hi Otis,
I too tried to disable the lucene locks for searching index by specifying
"$JAVACMD $TOMCAT_OPTS -DdisableLuceneLocks=true ....." in tomcat.sh.
To make sure the variable is set properly I also tried to print its
value.(see below the line marked by arrow).

But still I got the following exception stack trace on searching on readonly
index directory:
--------------<snip>----------------------------------------------
INFO: disableLuceneLocks = true    <----------------------
SEVERE: 
java.io.IOException: Permission denied
        at java.io.UnixFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(File.java:827)
        at org.apache.lucene.store.FSDirectory$1.obtain(Unknown Source)
        at org.apache.lucene.store.Lock$With.run(Unknown Source)
        at org.apache.lucene.index.IndexReader.open(Unknown Source)
        at org.apache.lucene.index.IndexReader.open(Unknown Source)
        at org.apache.lucene.search.IndexSearcher.<init>(Unknown Source)
        at deshaw.desearch.search.FileSearcher.search(FileSearcher.java:778)
        at deshaw.desearch.search.FileSearcher.doPost(FileSearcher.java:212)
        at deshaw.desearch.search.FileSearcher.doGet(FileSearcher.java:95)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)
        at org.apache.tomcat.core.Handler.service(Handler.java:286)
        at
org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
        at
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
7)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
        at
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
onnectionHandler.java:210)
        at
org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498)
        at java.lang.Thread.run(Thread.java:536)
Feb 28, 2003 12:51:49 PM deshaw.desearch.search.FileSearcher doPost
--------------</snip>----------------------------------------------

I susspect there may be problem with Lucene Version.
I am using Lucene version 1.2-rc4. I guess this is the most recent version.
Let me know which version you tested this with.

Thanks.

Regards,
-goutam- 



-----Original Message-----
From: Otis Gospodnetic [mailto:otis_gospodnetic@yahoo.com]
Sent: Monday, February 24, 2003 10:17 AM
To: Lucene Users List
Subject: Re: Index-file locking while searching?


Hello,

I think you didn't set that system property properly, or maybe you are
using some old Lucene release that does not have this functionality.
I just checked the source of FSDirectory, and the code looks right.

Otis

--- "Giri, Sandeep" <Sandeep-Giri@deshaw.com> wrote:
> Hi!
> I don't want to give write permission to the index directory while
> searching.
> But lucene needs write permission on index directory so that it can
> create
> locks while searching.
> So, I tried to use the "-DdisableLuceneLocks=true" but its not
> working.
> It gives the following error:
> -----<snip>--------------
> SEVERE: 
> java.io.IOException: Permission denied
>         at java.io.UnixFileSystem.createFileExclusively(Native
> Method)
>         at java.io.File.createNewFile(File.java:827)
>         at org.apache.lucene.store.FSDirectory$1.obtain(Unknown
> Source)
>         at org.apache.lucene.store.Lock$With.run(Unknown Source)
>         at org.apache.lucene.index.IndexReader.open(Unknown Source)
>         at org.apache.lucene.index.IndexReader.open(Unknown Source)
>         at org.apache.lucene.search.IndexSearcher.<init>(Unknown
> Source)
>         at FileSearcherCmdLine.search(FileSearcherCmdLine.java:93)
>         at FileSearcherCmdLine.main(FileSearcherCmdLine.java:689)
> [Search Time]: 0.0 secs
> -----</snip>--------------
> 
> What is the solution?
> Somebody, please help me out..
> 
> Thanks in advance.
> 
> Best Regards,
> Sandeep Giri
> Member Technical 
> D.E.Shaw India Software Pvt. Ltd. 
> Hyderabad.
> DISCLAIMER :"Any views expressed in this message are those of the
> individual
> sender, except where the sender specifically states them to be the
> views of
> D. E. Shaw India Software Private Limited., or any of its affiliates"
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: lucene-user-help@jakarta.apache.org
> 


__________________________________________________
Do you Yahoo!?
Yahoo! Tax Center - forms, calculators, tips, more
http://taxes.yahoo.com/

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message