試圖連接JOliver's EventStore與RavenDB,並遇到了一個障礙。 我在Raven中創建了一個名爲RavenEventStore的新數據庫。EventStore&RavenDB持久性JsonReaderException
以下是我的接線;
return Wireup.Init()
.UsingRavenPersistence("RavenEventStore")
.UsingAsynchronousDispatchScheduler()
.DispatchTo(new DelegateMessageDispatcher(DispatchCommit))
.Build();
當調用Wireup.Init()函數時,RavenDb端會發生此異常;
Url:「/ indexes/RavenCommitByDate」Newtonsoft.Json.JsonReaderException:解析值時遇到意外的字符:。在Newtonsoft.Json.JsonTextReader中的第1行,位置1處。 .ReadInternal()在d:\ Development \ Releases \ Json \ Working \ Src \ Newtonsoft.Json \ JsonTextReader.cs:行499 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader,Type t,JsonConverter propertyConverter)in d:\ Development \ Releases \ Json \ Working \ Src \ Newtonsoft.Json \ Serialization \ JsonSerializerInternalReader.cs:第1072行 位於d:\ Development \ Releases中的Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader,Type objectType) \ Json \ Working \ Src \ Newtonsoft.Json \ Serialization \ JsonSerializerInternalReader.cs:line 118 at Raven.Database.Extensions.HttpExtensions.ReadJsonOb在c:\ Builds \ raven \ Raven.Database \ Extensions \ HttpExtensions.cs中的ject [T](IHttpContext上下文):在Raven.Database.Server.Responders.Index.Put(IHttpContext context,String index)中的第57行 c :\ Builds \ raven \ Raven.Database \ Server \ Responders \ Index.cs:line 64 at Raven.Database.Server.Responders.Index.Respond(IHttpContext context)in c:\ Builds \ raven \ Raven.Database \ Server \ Responders \ Index.cs:line 49 at Raven.Database.Server.HttpServer.DispatchRequest(IHttpContext ctx)in c:\ Builds \ raven \ Raven.Database \ Server \ HttpServer.cs:line 477 at Raven.Database。 Server.HttpServer.HandleActualRequest(IHttpContext CTX)在C:\構建\烏鴉\ Raven.Database \服務器\ HttpServer.cs:行259
我可以看到excepti在RavenDB日誌中也是如此;
Newtonsoft.Json.JsonReaderException: Unexpected character encountered while parsing value: . Line 1, position 1. at Newtonsoft.Json.JsonTextReader.ParseValue(Char currentChar) in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\JsonTextReader.cs:line 699 at Newtonsoft.Json.JsonTextReader.ReadInternal() in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\JsonTextReader.cs:line 499 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.ReadForType(JsonReader reader, Type t, JsonConverter propertyConverter) in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 1072 at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserialize(JsonReader reader, Type objectType) in d:\Development\Releases\Json\Working\Src\Newtonsoft.Json\Serialization\JsonSerializerInternalReader.cs:line 118 at Raven.Database.Extensions.HttpExtensions.ReadJsonObject[T](IHttpContext context) in c:\Builds\raven\Raven.Database\Extensions\HttpExtensions.cs:line 57 at Raven.Database.Server.Responders.Index.Put(IHttpContext context, String index) in c:\Builds\raven\Raven.Database\Server\Responders\Index.cs:line 64 at Raven.Database.Server.Responders.Index.Respond(IHttpContext context) in c:\Builds\raven\Raven.Database\Server\Responders\Index.cs:line 49 at Raven.Database.Server.HttpServer.DispatchRequest(IHttpContext ctx) in c:\Builds\raven\Raven.Database\Server\HttpServer.cs:line 477 at Raven.Database.Server.HttpServer.HandleActualRequest(IHttpContext ctx) in c:\Builds\raven\Raven.Database\Server\HttpServer.cs:line 259
我試圖消除通過去除UsingAsynchronousDispatchScheduler()方法,以及所有的可能性,並招致同樣的錯誤。 我使用的代碼嚴格來自位於此處的示例: https://github.com/joliver/EventStore/blob/master/doc/EventStore.Example/MainProgram.cs
有沒有人遇到過這種情況?在Google上也找不到任何東西。
完美。我正在使用版本616.更新到800只是爲了測試並具有相同的問題,但隨後按照建議採取了下一步到888,並且問題解決了。 –