Return-Path: Delivered-To: apmail-lucene-java-user-archive@www.apache.org Received: (qmail 44336 invoked from network); 4 Aug 2006 21:14:33 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 4 Aug 2006 21:14:33 -0000 Received: (qmail 62965 invoked by uid 500); 4 Aug 2006 21:14:26 -0000 Delivered-To: apmail-lucene-java-user-archive@lucene.apache.org Received: (qmail 62941 invoked by uid 500); 4 Aug 2006 21:14:26 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 62930 invoked by uid 99); 4 Aug 2006 21:14:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Aug 2006 14:14:26 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [38.117.191.181] (HELO glgexchange01.glgroup.com) (38.117.191.181) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 04 Aug 2006 14:14:25 -0700 Content-Transfer-Encoding: 7bit Importance: normal Priority: normal Received: from glgexchange04.glgroup.com ([192.168.1.19]) by glgexchange01.glgroup.com with Microsoft SMTPSVC(6.0.3790.0); Fri, 4 Aug 2006 17:14:04 -0400 x-mimeole: Produced By Microsoft MimeOLE V6.00.3790.2663 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C6B80A.EA197198" Subject: running a lucene indexing app as a windows service on xp, crashing Date: Fri, 4 Aug 2006 17:14:04 -0400 Message-ID: <973858C2ADFF5C4F99415784F9391C060130C8B2@glgexchange04.glgroup.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: running a lucene indexing app as a windows service on xp, crashing Thread-Index: Aca4CunsILhkqvJtQ+GR+rGb+YKtJw== From: "Mark Modrall" To: X-OriginalArrivalTime: 04 Aug 2006 21:14:04.0337 (UTC) FILETIME=[EA19A210:01C6B80A] X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------_=_NextPart_001_01C6B80A.EA197198 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi... =20 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. =20 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. =20 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. =20 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. =20 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". =20 Any idea what the root cause is and how to work around it? =20 thanks -Mark =20 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. ------_=_NextPart_001_01C6B80A.EA197198--