dcsimg
java.io.IOException: Cannot delete
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Charles_Sanders
Posted On:   Wednesday, May 31, 2006 10:12 AM

In an attempt to re-create my index, I'm receiving the exception: java.io.IOException: Cannot delete _2s.cfs at org.apache.lucene.store.FSDirectory.create(FSDirectory.java:195) at org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:144) at org.apache.lucene.index.IndexWriter. (IndexWriter.java:225) The line of code throwing the exception is: IndexWriter writer = new IndexWriter(indexDir, new StandardAnalyzer(), true); I'm running: Windows XP Tomcat 5.5.9 JDK 1.5.0_04 Lucene 1.9.1 also seen in Lucene 1.4.3 When I attempt to delete the indicated file via Windows explorer, I receive an error indicating the file is in use    More>>

In an attempt to re-create my index, I'm receiving the exception:

java.io.IOException: Cannot delete _2s.cfs
at org.apache.lucene.store.FSDirectory.create(FSDirectory.java:195)
at org.apache.lucene.store.FSDirectory.getDirectory(FSDirectory.java:144)
at org.apache.lucene.index.IndexWriter. (IndexWriter.java:225)

The line of code throwing the exception is:
IndexWriter writer = new IndexWriter(indexDir, new StandardAnalyzer(), true);

I'm running:
Windows XP
Tomcat 5.5.9
JDK 1.5.0_04
Lucene 1.9.1
also seen in
Lucene 1.4.3

When I attempt to delete the indicated file via Windows explorer, I receive an error indicating the file is in use by another process.

Once I stop Tomcat, I am able to delete the file via Windows Explorer.

1) Is there a way to determine what process is using the file?

2) Is this a Lucene bug, or am I miss using lucene?

I've seen many post around the web on this same issue, but never a clear explanation as to the cause or the solution.

As always, any help greatly appreciated.
Charles

   <<Less

Re: java.io.IOException: Cannot delete

Posted By:   Otis_Gospodnetic  
Posted On:   Wednesday, May 31, 2006 06:41 PM

It's a Windows FS thing. It won't let you delete a file is something else has it open. Don't have a a solution...
About | Sitemap | Contact