lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Modrall" <MModr...@glgroup.com>
Subject running a lucene indexing app as a windows service on xp, crashing
Date Fri, 04 Aug 2006 21:14:04 GMT
Hi...

 

Not sure what's the right group for this question.  We have a java
program running with the tanuki Windows Service Wrapper on XP.  This
program is using Lucene to do a fair amount of indexing, creating and
deleting scads of files in its working directory.

 

The Lucene code is crashing under circumstances that seem pretty lame.
At periodic intervals, lucene tries to File.renameTo(newfile).
Sometimes this fails, so Lucene implemented some fall-back code to
manually copy the contents of the file from old to new.  Our problem is
that sometimes *this* fails too, then the whole thing blows up.

 

Specifically, the exception comes when Lucene is trying to create a
FileOutputStream(newFile) where the newFile doesn't exist yet.  The
error message reported is Access Denied, yet Lucene has already created
and destroyed hundreds of files in the directory already so it really
can't be a permissions thing on the directory.

 

This is semi-reproducible, but the thing that seems to trigger the error
is having a separate Windows Explorer window up, looking at the
directory and hitting Refresh frequently.  It seems like if Windows
Explorer is refreshing at the exact moment File.renameTo() and new
FileOutputStream() run, you get an Access Denied exception.

 

I don't know if this weak behavior stems from the JVM's implementation
or a weakness in the filesystem, but it's a bit of a nuisance.  If we
never use explorer to look at the directory, it may work but it seems
weak to have to tell people "Don't look at that".

 

Any idea what the root cause is and how to work around it?

 

thanks

-Mark

 
This e-mail message, and any attachments, is intended only for the use of the individual or
entity identified in the alias address of this message and may contain information that is
confidential, privileged and subject to legal restrictions and penalties regarding its unauthorized
disclosure and use. Any unauthorized review, copying, disclosure, use or distribution is strictly
prohibited. If you have received this e-mail message in error, please notify the sender immediately
by reply e-mail and delete this message, and any attachments, from your system. Thank you.

Mime
  • Unnamed multipart/alternative (inline, 7-Bit, 0 bytes)
View raw message