lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jason Polites" <>
Subject Access is denied on
Date Sat, 26 Aug 2006 07:25:16 GMT
Hi all,

When indexing with multiple threads, and under heavy load, I get the
following exception: Access is denied
    at Method)

I am using the Compass framework from Open Symphony, however this simply
sits on top of Lucene and the folks at Open Symphony have assured me that
the access to Lucene indexes within their framework is appropriately
synchronized.  In either case, I would have thought Lucene should be
managing its locks regardless of how the indexes are accessed (within the
same JVM at least).

There is a bug report on the Sun website for this issue:

This appears to be relevant, however it maybe Lucene is not synchronizing
appropriately when obtaining a lock?

The implementation in Lucene
2.0.0appears to obtain a file lock thus:

      public boolean obtain() throws IOException {
        if (disableLocks)
          return true;

        if (!lockDir.exists()) {
          if (!lockDir.mkdirs()) {
            throw new IOException("Cannot create lock directory: " +

        return lockFile.createNewFile();

Should the line "lockFile.createNewFile();" be within some form of
synchronizion block?


  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message