You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@jackrabbit.apache.org by Michael Neale <mi...@gmail.com> on 2007/02/21 06:16:08 UTC

IOException when trying to query - intermittently

Occasionally, I get the following error when trying to run a fairly mundane
query:

ERROR 21-02 15:06:12,573 (QueryImpl.java:execute:188)  -Exception while
executing query:
java.io.IOException: No such file or directory
    at java.io.UnixFileSystem.createFileExclusively(Native Method)
    at java.io.File.createNewFile(File.java:850)
    at org.apache.jackrabbit.core.query.lucene.FSDirectory$1.obtain(
FSDirectory.java:119)
    at org.apache.lucene.store.Lock.obtain(Lock.java:53)
    at org.apache.lucene.store.Lock$With.run(Lock.java:108)
    at org.apache.lucene.index.IndexReader.open(IndexReader.java:111)
    at org.apache.lucene.index.IndexReader.open(IndexReader.java:106)

Any ideas?

Re: IOException when trying to query - intermittently

Posted by Michael Neale <mi...@gmail.com>.
Hi Jukka.
No this is linux, Fedora Core 5 (laptop, not server).

Its rare, and it always works just by restarting the workspace.

        <SearchIndex class="
org.apache.jackrabbit.core.query.lucene.SearchIndex">
            <param name="path" value="${wsp.home}/index"/>
        </SearchIndex>

(I am using TransientRepository which creates this as needed - but that was
the content at the time it puked).

It does seem like a file system related intermittent thing - windows I would
not be surprised, but linux seems like its more of a race condition?

Anyone else seen this?
Is there a way to programmatically simulate starting up the workspace
multiple times - so I can try and trap this in a unit test?

Michael.

On 2/22/07, Jukka Zitting <ju...@gmail.com> wrote:
>
> Hi,
>
> On 2/21/07, Michael Neale <mi...@gmail.com> wrote:
> > Occasionally, I get the following error when trying to run a fairly
> mundane
> > query:
> >
> > ERROR 21-02 15:06:12,573 (QueryImpl.java:execute:188)  -Exception while
> > executing query:
> > java.io.IOException: No such file or directory
> >     at java.io.UnixFileSystem.createFileExclusively(Native Method)
> >     at java.io.File.createNewFile(File.java:850)
> >     at org.apache.jackrabbit.core.query.lucene.FSDirectory$1.obtain(
> > FSDirectory.java:119)
> >     at org.apache.lucene.store.Lock.obtain(Lock.java:53)
>
> Strange. Are you running on Windows? I've occasionally seen similar
> random IO errors on Windows especially if there's a dynamic virus
> scanner or some similar background tool operating.
>
> Alternatively it could be related to some query configuration issue.
> Please send the <SearchIndex/> configuration entry in the
> workspace.xml file within the workspace you're querying.
>
> BR,
>
> Jukka Zitting
>

Re: IOException when trying to query - intermittently

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On 2/21/07, Michael Neale <mi...@gmail.com> wrote:
> Occasionally, I get the following error when trying to run a fairly mundane
> query:
>
> ERROR 21-02 15:06:12,573 (QueryImpl.java:execute:188)  -Exception while
> executing query:
> java.io.IOException: No such file or directory
>     at java.io.UnixFileSystem.createFileExclusively(Native Method)
>     at java.io.File.createNewFile(File.java:850)
>     at org.apache.jackrabbit.core.query.lucene.FSDirectory$1.obtain(
> FSDirectory.java:119)
>     at org.apache.lucene.store.Lock.obtain(Lock.java:53)

Strange. Are you running on Windows? I've occasionally seen similar
random IO errors on Windows especially if there's a dynamic virus
scanner or some similar background tool operating.

Alternatively it could be related to some query configuration issue.
Please send the <SearchIndex/> configuration entry in the
workspace.xml file within the workspace you're querying.

BR,

Jukka Zitting