Embedded - 'System.IO.IOException' occurred in Lucene.Net.dll

1,149 views
Skip to first unread message

Hykkel

unread,
May 4, 2011, 8:23:48 AM5/4/11
to ravendb
Hi. I get this error when the embedded ravendb starts updating its
indexes. Can anyone explain? (should I write the index and query
differently?).
All the indexes works fine, but during indexing the outputfield is
"spammed" with the following.

Error (from output) during debug:
A first chance exception of type 'System.IO.IOException' occurred in
mscorlib.dll
A first chance exception of type 'System.IO.IOException' occurred in
Lucene.Net.dll
...

RavenDB Version: 359 (embedded)

Code to start the DB:
EmbeddedStore = new EmbeddableDocumentStore()
{
DataDirectory = Config.Instance.DataPath + "RavenDB\
\",
//UseEmbeddedHttpServer = true,
};
EmbeddedStore.Initialize();

Code that creates an index:
EmbeddedStore.DatabaseCommands.PutIndex("AnTestIndex",
new IndexDefinitionBuilder<DataClass, DataClass>()
{
Map = docs => from doc in docs
where doc.SomeId != null && doc.TimeStamp != null
select new
{
doc.SomeId,
doc.TimeStamp
},
});

Code that uses the index:
var meterEntries =
session.Query<DataClass>("AnTestIndex").Where(x => x.SomeId == id &&
x.TimeStamp > afterTime && x.TimeStamp < beforeTime).OrderBy(y =>
y.TimeStamp).ToArray();


Output again with exceptions (but results are correct):
A first chance exception of type
'Lucene.Net.QueryParsers.QueryParser.LookaheadSuccess' occurred in
Lucene.Net.dll
A first chance exception of type
'Lucene.Net.QueryParsers.QueryParser.LookaheadSuccess' occurred in
Lucene.Net.dll
A first chance exception of type 'System.FormatException' occurred in
mscorlib.dll
A first chance exception of type 'System.FormatException' occurred in
mscorlib.dll
A first chance exception of type
'Lucene.Net.QueryParsers.QueryParser.LookaheadSuccess' occurred in
Lucene.Net.dll
A first chance exception of type 'System.IO.IOException' occurred in
Lucene.Net.dll
A first chance exception of type 'System.FormatException' occurred in
mscorlib.dll
A first chance exception of type 'System.FormatException' occurred in
mscorlib.dll
Query returned 2/2 results
A first chance exception of type 'Newtonsoft.Json.JsonReaderException'
occurred in Raven.Json.dll
A first chance exception of type 'Newtonsoft.Json.JsonReaderException'
occurred in Raven.Json.dll

The Class:
public class DataClass
{
public List<byte[]> Data { get; set; }
public int SomeId { get; set; }
public DateTime TimeStamp { get; set; }

public CompactMBusData()
{
}
}

Ayende Rahien

unread,
May 4, 2011, 9:14:17 AM5/4/11
to rav...@googlegroups.com
Lucene is very trigger happy with exceptions, it catches most of those internally, but they are quite annoying, I agree.

Matt Warren

unread,
May 4, 2011, 10:11:00 AM5/4/11
to ravendb
You can *almost* always ignore first chance exceptions, see
http://blogs.msdn.com/b/davidklinems/archive/2005/07/12/438061.aspx
and http://www.helixoft.com/blog/archives/24 for a bit more info.

Hykkel

unread,
May 4, 2011, 10:58:40 AM5/4/11
to ravendb
Thank's alot (both of you).

Is there a reason why my EmbeddedHttpServer doesn't show anymore
(since upgrade from 322)?
I've tried in both IE8 and Google Chrome and have SilverLight Version:
4.0.60310.0

/Hykkel

On 4 Maj, 16:11, Matt Warren <mattd...@gmail.com> wrote:
> You can *almost* always ignore first chance exceptions, seehttp://blogs.msdn.com/b/davidklinems/archive/2005/07/12/438061.aspx
> andhttp://www.helixoft.com/blog/archives/24for a bit more info.

Ryan Roberts

unread,
May 4, 2011, 11:14:29 AM5/4/11
to rav...@googlegroups.com
It's the dodgy javacc parser implementation in Lucene.NET. Noisy and
annoying. As the Lucene.NET Project is meant to be a transliteration
of the Java project I'm not sure what can be done bar forking it.

Ayende Rahien

unread,
May 5, 2011, 2:22:37 AM5/5/11
to rav...@googlegroups.com
What do you mean, doesn't show anymore?
If you go to localhost:8080/docs, do you see something?
Reply all
Reply to author
Forward
0 new messages