When using Lucene, it's common to get a handful of IOExceptions appearing in
the Output window every time I access the index, they're handled, so they're
not really a problem. It's also quite common for us to have an unhandled
exception pop up too:

"Access to the path 'C:\\Users\\timhaughton\\HDM AppData
Test\\MetaDataIndex\\segments_7h' is denied."

This typically happens when we're performing a series of actions, e.g. doing
a delete then an add within a for loop. All access to the index occurs under
lock, I don't even allow concurrent read access - just to see if it fixes it
- it doesn't.

Has anyone else seen this before? Does it indicate I'm doing anything wrong?

Regards,

Tim Haughton
www.agilemicroisv.com
Skype: timhaughton
[image: Linkedin] <http://www.linkedin.com/in/timhaughton>[image:
Facebook]<http://www.facebook.com/timhaughton>[image:
Twitter] <http://www.twitter.com/dokix>
Blog RSS Two’s Company<http://feedproxy.google.com/%7Er/TheAgileMicroISVBlog/%7E3/jwNwE6dQnAc/>

Search Discussions

  • Tim Haughton at Jan 31, 2010 at 11:31 am
    Some more relevant info:

    Version: Dev version Exception Date: 30 January 2010
    Exception Type: System.
    UnauthorizedAccessException

    DotNet Details
    ==============

    1.0: 0.0
    1.1: 0.0
    2.0: 2.0.50727.4927
    3.0: 3.0.30729.4926
    3.5: 3.5.30729.4926

    CardSpace: 3.0.4506.4926
    WPF: 3.0.6920.4902
    WCF: 3.0.4506.4926
    WF: 3.0.4203.4926

    OS Details
    ==========

    Microsoft Windows NT 6.1.7600.0

    Hardware
    ========

    CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
    Processor ID: 178BFBFF00060FB2
    Number Of Cores: 2
    Number Of Processors: 2
    Manufacturer: NVIDIA
    Model: AWRDACPI
    Total Physical Memory: 4026064896
    Graphics Card: NVIDIA GeForce 6150
    Graphics Card Driver Version: 8.17.11.9562
    Video Mode:

    Description
    ===========



    Exception
    =========

    Access to the path 'C:\Users\timhaughton\HDM AppData
    Test\MetaDataIndex\segments_7h' is denied.

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.File.Delete(String path)
    at Lucene.Net.Store.FSDirectory.DeleteFile(String name) in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Store\FSDirectory.cs:line
    436
    at Lucene.Net.Index.IndexFileDeleter.DeleteFile(String fileName) in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\IndexFileDeleter.cs:line
    588
    at Lucene.Net.Index.IndexFileDeleter.DecRef(String fileName) in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\IndexFileDeleter.cs:line
    529
    at Lucene.Net.Index.IndexFileDeleter.DeleteCommits() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\IndexFileDeleter.cs:line
    291
    at Lucene.Net.Index.IndexFileDeleter.Checkpoint(SegmentInfos segmentInfos,
    Boolean isCommit) in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\IndexFileDeleter.cs:line
    445
    at Lucene.Net.Index.DirectoryIndexReader.DoCommit() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\DirectoryIndexReader.cs:line
    268
    at Lucene.Net.Index.IndexReader.Commit() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\IndexReader.cs:line
    941
    at Lucene.Net.Index.IndexReader.DecRef() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\IndexReader.cs:line
    157
    at Lucene.Net.Index.SegmentReader.DecRef() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\SegmentReader.cs:line
    201
    at Lucene.Net.Index.IndexReader.Close() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\IndexReader.cs:line
    961
    at HDM.IndexManager.RemoveFromMetaIndex(EDMDocument document) in
    C:\Users\timhaughton\svn\HDM\src\Application\Core\Data\IndexManager.cs:line
    219

    On 30 January 2010 23:00, Tim Haughton wrote:

    When using Lucene, it's common to get a handful of IOExceptions appearing
    in the Output window every time I access the index, they're handled, so
    they're not really a problem. It's also quite common for us to have an
    unhandled exception pop up too:

    "Access to the path 'C:\\Users\\timhaughton\\HDM AppData
    Test\\MetaDataIndex\\segments_7h' is denied."

    This typically happens when we're performing a series of actions, e.g.
    doing a delete then an add within a for loop. All access to the index occurs
    under lock, I don't even allow concurrent read access - just to see if it
    fixes it - it doesn't.

    Has anyone else seen this before? Does it indicate I'm doing anything
    wrong?

    Regards,

    Tim Haughton
    www.agilemicroisv.com
    Skype: timhaughton
    [image: Linkedin] <http://www.linkedin.com/in/timhaughton>[image:
    Facebook] <http://www.facebook.com/timhaughton>[image: Twitter]<http://www.twitter.com/dokix>
    Blog RSS Two’s Company<http://feedproxy.google.com/%7Er/TheAgileMicroISVBlog/%7E3/jwNwE6dQnAc/>
  • Digy at Jan 31, 2010 at 11:42 pm
    If it were a bug in Lucene.NET you would probably get IOException ("The
    process cannot access the file '....' because it is being used by another
    process") not UnauthorizedAccessException.

    It may be related with some security settings (like accessing the index
    without necessary permissions).

    DIGY

    -----Original Message-----
    From: Tim Haughton
    Sent: Sunday, January 31, 2010 1:31 PM
    To: lucene-net-user@incubator.apache.org
    Subject: Re: Unauthorized Exception Error

    Some more relevant info:

    Version: Dev version Exception Date: 30 January 2010
    Exception Type: System.
    UnauthorizedAccessException

    DotNet Details
    ==============

    1.0: 0.0
    1.1: 0.0
    2.0: 2.0.50727.4927
    3.0: 3.0.30729.4926
    3.5: 3.5.30729.4926

    CardSpace: 3.0.4506.4926
    WPF: 3.0.6920.4902
    WCF: 3.0.4506.4926
    WF: 3.0.4203.4926

    OS Details
    ==========

    Microsoft Windows NT 6.1.7600.0

    Hardware
    ========

    CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
    Processor ID: 178BFBFF00060FB2
    Number Of Cores: 2
    Number Of Processors: 2
    Manufacturer: NVIDIA
    Model: AWRDACPI
    Total Physical Memory: 4026064896
    Graphics Card: NVIDIA GeForce 6150
    Graphics Card Driver Version: 8.17.11.9562
    Video Mode:

    Description
    ===========



    Exception
    =========

    Access to the path 'C:\Users\timhaughton\HDM AppData
    Test\MetaDataIndex\segments_7h' is denied.

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.File.Delete(String path)
    at Lucene.Net.Store.FSDirectory.DeleteFile(String name) in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Store\FS
    Directory.cs:line
    436
    at Lucene.Net.Index.IndexFileDeleter.DeleteFile(String fileName) in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\In
    dexFileDeleter.cs:line
    588
    at Lucene.Net.Index.IndexFileDeleter.DecRef(String fileName) in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\In
    dexFileDeleter.cs:line
    529
    at Lucene.Net.Index.IndexFileDeleter.DeleteCommits() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\In
    dexFileDeleter.cs:line
    291
    at Lucene.Net.Index.IndexFileDeleter.Checkpoint(SegmentInfos segmentInfos,
    Boolean isCommit) in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\In
    dexFileDeleter.cs:line
    445
    at Lucene.Net.Index.DirectoryIndexReader.DoCommit() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\Di
    rectoryIndexReader.cs:line
    268
    at Lucene.Net.Index.IndexReader.Commit() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\In
    dexReader.cs:line
    941
    at Lucene.Net.Index.IndexReader.DecRef() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\In
    dexReader.cs:line
    157
    at Lucene.Net.Index.SegmentReader.DecRef() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\Se
    gmentReader.cs:line
    201
    at Lucene.Net.Index.IndexReader.Close() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\In
    dexReader.cs:line
    961
    at HDM.IndexManager.RemoveFromMetaIndex(EDMDocument document) in
    C:\Users\timhaughton\svn\HDM\src\Application\Core\Data\IndexManager.cs:line
    219

    On 30 January 2010 23:00, Tim Haughton wrote:

    When using Lucene, it's common to get a handful of IOExceptions appearing
    in the Output window every time I access the index, they're handled, so
    they're not really a problem. It's also quite common for us to have an
    unhandled exception pop up too:

    "Access to the path 'C:\\Users\\timhaughton\\HDM AppData
    Test\\MetaDataIndex\\segments_7h' is denied."

    This typically happens when we're performing a series of actions, e.g.
    doing a delete then an add within a for loop. All access to the index occurs
    under lock, I don't even allow concurrent read access - just to see if it
    fixes it - it doesn't.

    Has anyone else seen this before? Does it indicate I'm doing anything
    wrong?

    Regards,

    Tim Haughton
    www.agilemicroisv.com
    Skype: timhaughton
    [image: Linkedin] <http://www.linkedin.com/in/timhaughton>[image:
    Facebook] <http://www.facebook.com/timhaughton>[image:
    Twitter]<http://www.twitter.com/dokix>
    Blog RSS Two's
    Company<http://feedproxy.google.com/%7Er/TheAgileMicroISVBlog/%7E3/jwNwE6dQn
    Ac/>
  • Michael Garski at Feb 1, 2010 at 6:44 pm
    The exception more than likely stems from attempting to delete a file is
    being referenced. It is swallowed internally and the file is placed
    into a list to allow the delete to be attempted again at a later time.

    When deletes are applied to the index, the underlying reader that
    performs the deletes will lock files while it is open to ensure the
    index is not deleted out from under it.

    Michael

    -----Original Message-----
    From: Tim Haughton
    Sent: Sunday, January 31, 2010 3:31 AM
    To: lucene-net-user@incubator.apache.org
    Subject: Re: Unauthorized Exception Error

    Some more relevant info:

    Version: Dev version Exception Date: 30 January 2010
    Exception Type: System.
    UnauthorizedAccessException

    DotNet Details
    ==============

    1.0: 0.0
    1.1: 0.0
    2.0: 2.0.50727.4927
    3.0: 3.0.30729.4926
    3.5: 3.5.30729.4926

    CardSpace: 3.0.4506.4926
    WPF: 3.0.6920.4902
    WCF: 3.0.4506.4926
    WF: 3.0.4203.4926

    OS Details
    ==========

    Microsoft Windows NT 6.1.7600.0

    Hardware
    ========

    CPU: AMD Athlon(tm) 64 X2 Dual Core Processor 4200+
    Processor ID: 178BFBFF00060FB2
    Number Of Cores: 2
    Number Of Processors: 2
    Manufacturer: NVIDIA
    Model: AWRDACPI
    Total Physical Memory: 4026064896
    Graphics Card: NVIDIA GeForce 6150
    Graphics Card Driver Version: 8.17.11.9562
    Video Mode:

    Description
    ===========



    Exception
    =========

    Access to the path 'C:\Users\timhaughton\HDM AppData
    Test\MetaDataIndex\segments_7h' is denied.

    at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
    at System.IO.File.Delete(String path)
    at Lucene.Net.Store.FSDirectory.DeleteFile(String name) in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Stor
    e\FSDirectory.cs:line
    436
    at Lucene.Net.Index.IndexFileDeleter.DeleteFile(String fileName) in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Inde
    x\IndexFileDeleter.cs:line
    588
    at Lucene.Net.Index.IndexFileDeleter.DecRef(String fileName) in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Inde
    x\IndexFileDeleter.cs:line
    529
    at Lucene.Net.Index.IndexFileDeleter.DeleteCommits() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Inde
    x\IndexFileDeleter.cs:line
    291
    at Lucene.Net.Index.IndexFileDeleter.Checkpoint(SegmentInfos
    segmentInfos,
    Boolean isCommit) in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Inde
    x\IndexFileDeleter.cs:line
    445
    at Lucene.Net.Index.DirectoryIndexReader.DoCommit() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Inde
    x\DirectoryIndexReader.cs:line
    268
    at Lucene.Net.Index.IndexReader.Commit() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Inde
    x\IndexReader.cs:line
    941
    at Lucene.Net.Index.IndexReader.DecRef() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Inde
    x\IndexReader.cs:line
    157
    at Lucene.Net.Index.SegmentReader.DecRef() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Inde
    x\SegmentReader.cs:line
    201
    at Lucene.Net.Index.IndexReader.Close() in
    C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Inde
    x\IndexReader.cs:line
    961
    at HDM.IndexManager.RemoveFromMetaIndex(EDMDocument document) in
    C:\Users\timhaughton\svn\HDM\src\Application\Core\Data\IndexManager.cs:l
    ine
    219

    On 30 January 2010 23:00, Tim Haughton wrote:

    When using Lucene, it's common to get a handful of IOExceptions appearing
    in the Output window every time I access the index, they're handled, so
    they're not really a problem. It's also quite common for us to have an
    unhandled exception pop up too:

    "Access to the path 'C:\\Users\\timhaughton\\HDM AppData
    Test\\MetaDataIndex\\segments_7h' is denied."

    This typically happens when we're performing a series of actions, e.g.
    doing a delete then an add within a for loop. All access to the index occurs
    under lock, I don't even allow concurrent read access - just to see if it
    fixes it - it doesn't.

    Has anyone else seen this before? Does it indicate I'm doing anything
    wrong?

    Regards,

    Tim Haughton
    www.agilemicroisv.com
    Skype: timhaughton
    [image: Linkedin] <http://www.linkedin.com/in/timhaughton>[image:
    Facebook] <http://www.facebook.com/timhaughton>[image:
    Twitter]<http://www.twitter.com/dokix>
    Blog RSS Two's
    Company<http://feedproxy.google.com/%7Er/TheAgileMicroISVBlog/%7E3/jwNwE
    6dQnAc/>

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouplucene-net-user @
categorieslucene
postedJan 30, '10 at 11:00p
activeFeb 1, '10 at 6:44p
posts4
users3
websitelucene.apache.org

People

Translate

site design / logo © 2022 Grokbase