Hykkel
unread,May 4, 2011, 8:23:48 AM5/4/11Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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()
{
}
}