lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Eric Isakson" <Eric.Isak...@sas.com>
Subject RE: Lucene 1.4 RC 3 issue with temp directory
Date Mon, 17 May 2004 21:04:30 GMT
Your catalina.bat script is guessing your CATALINA_HOME environment variable since you don't
have one set and is setting java.io.tmpdir based on that guess. You could work around this
by setting a CATALINA_HOME environment variable or setting the system property org.apache.lucene.lockdir.
That doesn't solve the problem for Lucene locks when java.io.tmpdir is set to a relative path
that does not exist though.

Eric

-----Original Message-----
From: Grant Ingersoll [mailto:gsingers@syr.edu] 
Sent: Monday, May 17, 2004 2:15 PM
To: lucene-user@jakarta.apache.org
Subject: Lucene 1.4 RC 3 issue with temp directory


Hi All,

I just upgraded to 1.4 RC 3 and am now unable to open my index.

I am getting: 
java.io.IOException: The system cannot find the path specified
        at java.io.WinNTFileSystem.createFileExclusively(Native Method)
        at java.io.File.createNewFile(File.java:828)
        at org.apache.lucene.store.FSDirectory$1.obtain(FSDirectory.java:297)
        at org.apache.lucene.store.Lock.obtain(Lock.java:53)
        at org.apache.lucene.store.Lock$With.run(Lock.java:108)
        at org.apache.lucene.index.IndexReader.open(IndexReader.java:111)
        at org.apache.lucene.index.IndexReader.open(IndexReader.java:95)
        at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:38)
....

I _have_ reindexed using the new lucene jar.  I am positive the path is correct as I can open
an index in the same directory with the old Lucene with no problems.  I notice that the problem
only occurs when I am deployed inside of Tomcat.  If I run searches on the command line or
through JUnit everything functions correctly.  

When I print out the lockDir location that is trying to be obtained above, it looks like:
C:\ENG\index\LDC\trec-ar-dar\..\temp which is the directory my index resides in, except ..\temp
does not exist.  When I create the directory, it works.  I suppose I could create the temp
directory for every index, but I didn't know that was a requirement.  I do notice that Tomcat
has a temp directory at the top, so it is probably setting some system property ("java.io.tmpdir"????)
variable to "..\temp" that is being picked up by Lucene?  The question is, what changed in
RC 3 that would cause this to be used when it wasn't before? 

On a side note, would it be useful to create the lock directory if it doesn't exist?  If the
developers think so, I can submit the patch for it.

Thanks,
Grant


---------------------------------------------------------------------
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