Thanks for the quick response,
I had actually seen that it was a first chance exception, but it is
just the first of a series of exceptions, which is thrown and
ultimatly ends up with no 'User' being returned from the query.
I then (probably mistakenly :-)) assumed that all other errors
originated from the first error.
Here is all the exceptions, in the sequence of which the occour. Note
they are alle first chance, but the Query from above now no longer
returns anything, although it works fine with no debugger attach.
System.IO.FileNotFoundException occurred
Message=segments.gen
Source=Lucene.Net
StackTrace:
at Lucene.Net.Store.RAMDirectory.OpenInput(String name) in z:
\Projects\ravendb\SharedLibs\Sources\Lucene2.9.2\src\Lucene.Net\Store
\RAMDirectory.cs:line 301
InnerException:
System.IO.FileNotFoundException occurred
Message=no segments* file found in Lucene.Net.Store.RAMDirectory:
files:
Source=Lucene.Net
StackTrace:
at
Lucene.Net.Index.SegmentInfos.FindSegmentsFile.Run(IndexCommit commit)
in z:\Projects\ravendb\SharedLibs\Sources\Lucene2.9.2\src\Lucene.Net
\Index\SegmentInfos.cs:line 761
InnerException:
Lucene.Net.QueryParsers.QueryParser.LookaheadSuccess occurred
Message=Error in the application.
Source=Lucene.Net
StackTrace:
at Lucene.Net.QueryParsers.QueryParser.Jj_scan_token(Int32
kind) in z:\Projects\ravendb\SharedLibs\Sources\Lucene2.9.2\src
\Lucene.Net\QueryParser\QueryParser.cs:line 2182
InnerException:
System.IO.IOException occurred
Message=read past eof
Source=Lucene.Net
StackTrace:
at Lucene.Net.QueryParsers.FastCharStream.Refill() in z:
\Projects\ravendb\SharedLibs\Sources\Lucene2.9.2\src\Lucene.Net
\QueryParser\FastCharStream.cs:line 89
InnerException:
System.IO.IOException occurred
Message=read past eof
Source=Lucene.Net
StackTrace:
at Lucene.Net.QueryParsers.FastCharStream.Refill() in z:
\Projects\ravendb\SharedLibs\Sources\Lucene2.9.2\src\Lucene.Net
\QueryParser\FastCharStream.cs:line 89
InnerException:
On 22 Jun., 12:56, Ayende Rahien <
aye...@ayende.com> wrote:
> This isn't an issue, the exception is handled internally, and you won't see
> it in your code.
>
>
>
> On Wed, Jun 22, 2011 at 1:53 PM, Udengaard <
l...@udengaard.org> wrote:
> > Hi,
>
> > Im getting an error in Lucene.Net, using latest RavenDB build 371.
> > The error occours in the following line in my code (the first query
> > being executed):
>
> > Session.Query<User>().Where(x => x.Username ==
> > username).SingleOrDefault();
>
> > The stacktrace is:
> > System.IO.FileNotFoundException occurred
> > Message=segments.gen
> > Source=Lucene.Net
> > StackTrace:
> > at Lucene.Net.Store.RAMDirectory.OpenInput(String name) in z:
> > \Projects\ravendb\SharedLibs\Sources\Lucene2.9.2\src\Lucene.Net\Store
> > \RAMDirectory.cs:line 301
>
> > The weirdest part is that the error only occours when i run my tests
> > with debugger attached?
>
> > This is what my store setup looks like (using windsor):
> > public class TestPersistenceFacility : AbstractFacility
> > {
> > protected override void Init()
> > {
>
> > Kernel.Register(Component.For<IDocumentStore>().UsingFactoryMethod(CreateDocumentStore));
>
> > Kernel.Register(Component.For<IDocumentSession>().UsingFactoryMethod(OpenSession));
> > }
>
> > protected IDocumentSession OpenSession(IKernel kernel)
> > {
> > return kernel.Resolve<IDocumentStore>().OpenSession();
> > }
>
> > protected IDocumentStore CreateDocumentStore()
> > {
> > var store = new EmbeddableDocumentStore
> > {
> > RunInMemory = true
> > };
> > store.Initialize();
> > return store;
> > }
> > }
>
> > Am i doing something wrong? :-)
>
> > Regard,
> > Lars- Skjul tekst i anførselstegn -
>
> - Vis tekst i anførselstegn -